zzz projects SqlBulkCopy Tutorial
Documentation Troubleshooting
Knowledge Base
  • Documentation
  • Troubleshooting
  • Knowledge Base

SqlBulkCopy Tutorial - Knowledge Base (KB)

641 results

How can I use SqlBulkCopy to avoid inserting duplicates?

I am going to use SqlBulkCopy, but I need to prevent duplicates insert. What is the best way to do it? Have I do check existence for each item before make execute WriteToServer command?
c# sqlbulkcopy sql-server-2008
asked by Yara

Using C#, process each row and copy it to a new table.

I have an MSSQL 2008 table with a few million records. I need to iterate over each row, modify some of the data, and copy the updated record to a new table using a C# application that gets executed on a daily basis. ...I have tried doing this using ADO.NE...
c# sqlbulkcopy sql-server sql-server-2008
asked by CalMlynarczyk

Obtain a suitable schema for 1 GB xml files.

I need to bulk load huge xml files to SQL Server 2005. I decided to use SQLXMLBULKLOAD in my C# app, but I need to get valid xsd-schemas of those xml files to load them. Which is best way to generate xsd file? I tried MS VS xsd.exe, but it tries to load t...
sql sqlbulkcopy sqlxml xml xsd
asked by Andrey Gordeev

In SQL Server 2005, how can I bulk transfer comparable data to two tables?

I've 'inherited' some code that I am having a hard time working with. The application has an excel import function to import members to a members table, and ...SqlBulkCopy... is used. ...A few months ago a junction table was added and two of the attribute...
sql sqlbulkcopy sql-server-2005
asked by Iris Classon

What is the difference between passing SqlBulkCopyOptions and passing SqlBulkCopy? InternalTransaction is used but not passed?

I am trying to find the difference between using SqlBulkCopy with the ...SqlBulkCopyOptions.UseInternalTransaction... copy option and without it, but in my test application I do not detect any difference. If ...BatchSize... is for example 0 and I add 100 ...
.net sqlbulkcopy sql-server windows
asked by Jürgen Bayer

Bulkcopy to SQL table problem in C#

Using C#, .net 4, Visual Studio 2010, and SQL Server 2008....I currently have a table called ...NewPeriodPareto... contains the following columns:...PG nvarchar(50)...Part nvarchar(50)...Sales float...LostSales float...Pareto6 int...p6 image...Pareto5 int...
c# datagridview sql sqlbulkcopy
asked by lemunk

How to extract primary key from SqlBulkCopy when inserting numerous rows in EF is too slow?

We have a use case in our application where a user triggers a request that will cause an insert of 100 to 1000 rows.... After that insert, we need the object to continue processing and create more objects which are foreign keys to the originally inserted ...
entity-framework sql sqlbulkcopy
asked by Jonathan Levison

Case sensitivity in SQL Server column names

The DB I use has French_CI_AS collation (CI should stand for Case-Insensitive) but is case-sensitive anyway. I'm trying to understand why....The reason I assert this is that bulk inserts with a 'GIVEN' case setup fail, but they succeed with another 'Given...
case-insensitive case-sensitive collation sqlbulkcopy sql-server
asked by Skippy Fastol

Finding the rows that caused the constraint failure

Any idea if it's possible to get a list of the trouble making rows in an INSERT/UPDATE statement when a constraint test fails? ...I'm trying to insert data with an SQLBulkCopy object reading data from a DataTable, and when the constraint fails I have no w...
constraints datatable sqlbulkcopy sql-server
asked by David Catriel

ASP.NET: Using blkCopy to upload an excel file and adding a user-defined column

At the moment my program is uploading an excel file through the browser to the server. That excel file is then being read on the server and its value are being placed in a database. The problem I am looking to solve is I want to add one more column, but I...
asp.net c# database sql sqlbulkcopy
asked by kev670

Dapper bulk inserts are taking longer than planned.

After reading ...this article... I decided to take a closer look at the way I was using Dapper....I ran this code on an empty database...var members = new List<Member>(); for (int i = 0; i < 50000; i++) { members.Add(new Member() { Usernam...
dapper performance sqlbulkcopy
asked by kenwarner

Primary keys are not copied by SQLBulkCopy.

What is the best way to deal with the primary key violation errors when using SQLBulkCopy ...Violation of PRIMARY KEY constraint 'email_k__'. Cannot insert duplicate key in object 'lntmuser.email'. ...(i.e. if the row already exists in the destination t...
c# sqlbulkcopy sql-server
asked by bumble_bee_tuna

Using SQLBulkCopy to import data

We have a legacy application that is dumping large volumes of data to tab delimited files. Each file contains a single record type and all fields are fixed length....These files can readily be imported into corresponding tables in our SQL server database ...
sqlbulkcopy vb.net
asked by Andy

SQL Server Ordering

I have a situation where I am importing many rows of data from text files. The import process occurs using SqlBulkCopy and initially loads into a staging table. ...I perform some validation on this data and would like to be able to report back to the user...
sqlbulkcopy sql-server-2008
asked by Mr Moose

Date Time values in SQL Bulk Insert

i am importing some excel files to sql server using c# console application with SqlBulkcopy and receiving following exception while importing date time values....Exception: This exception is arising when we are going to do bulk copy, where one or more col...
c# sql sqlbulkcopy sql-server
asked by steave finner

SQLBulkCopy with Identity Insert in destination table

I am trying to insert a Generic list to SQL Server with SQLBulkCopy,...And i have trouble wit Identity Field...I wan t my destination table to generate identity field How should i handle this, here is my code...using (var bulkCopy = new SqlBulkCopy(Config...
c#-4.0 sqlbulkcopy sql-server-2008
asked by HaBo

Cannot access database through linked server

I am using the SqlBulkCopy Feature to store bulk data in to Sql database....For Ex: bulkCopy.DestinationTableName = "employeetable". This code works fine. But In a scenario, where i don't have access to the Destination database directly through Connection...
ado.net c# exception-handling linked-server sqlbulkcopy
asked by Boopal

Need recommendations on pushing the envelope with SqlBulkCopy on SQL Server

I am designing an application, one aspect of which is that it is supposed to be able to receive massive amounts of data into SQL database. I designed the database stricture as a single table with bigint identity, something like this one:...CREATE TABLE Ma...
bulkinsert database-performance scalability sqlbulkcopy sql-server
asked by galets

SqlBulkCopy unusual TimeOut Error

I have a SqlBulkCopy operation that is taking data from an MS-Access 2007 database (via OleDbConnection) and using SqlBulkCopy to transfer that data to a SQL Server database. This has previously been working and continues to work for one MS-Access databa...
sqlbulkcopy timeoutexception
asked by ChrisHDog

import text file(500 MB) data into SQL Server

Here is my code that I am using for importing text files larger than 500 MB into database....I want to do it in batches so that if any format related error occur in text file during execution at least half of it contents uploaded....If any other suggestio...
asp.net c# sqlbulkcopy sql-server
asked by user1487506

Page 10 of 33
  • ««
  • «
  • …
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • …
  • »
  • »»

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!