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

SqlBulkCopy Tutorial - Knowledge Base (KB)

74 results in tag: .net

What's the best technique to populate an extremely big table using SqlBulkCopy?

Nightly, I need to fill a SQL Server 2005 table from an ODBC source with over 8 million records. Currently I am using an insert statement from linked server with syntax select similar to this:...Insert Into SQLStagingTable from Select * from OpenQuery(ODB...
.net c# sqlbulkcopy sql-server vb.net
asked by Chad Braun-Duin

Loading a DataSet from SQL Server with table definitions and relations (but no data).

I'm not an expert with either System.Data nor SQL Server, but have a need to generate a large DataSet then use System.Data.SqlClient.SqlBulkCopy to store the results....The DataSet will consist of about 10 related tables. When SqlBulkCopy transfers the D...
.net sql sqlbulkcopy
asked by James Hugard

DataTables with a Parent/Child Relationship on the Identity Column and SqlBulkCopy

We have a need to update several tables that have parent/child relationships based on an Identity primary-key in the parent table, which is referred to by one or more child tables as a foreign key....Due to the high volume of data, we would like to build ...
.net c# sqlbulkcopy sql-server
asked by James Hugard

Before using SqlBulkCopy, truncate.

I want to truncate a table before doing a SqlBulkCopy. Does SqlBulkCopy automatically truncate a table before copying the data?
.net sql sqlbulkcopy
asked by Swami

SqlBulkCopy into composite primary key table

I'm trying to use SqlBulkCopy to insert new rows into my DB table by manually populating a DataTable w/in my application....This works fine for all tables ...except the table that has a composite primary key made up of 3 columns.... Whenever I try to Sql...
.net c# sql sqlbulkcopy sql-server-2005
asked by kamens

Relationship between Client and Parent in SQL Bulkcopy

we have 2 DataTables in a .NET application having a Client / Parent relationship with millions of rows. This data should be inserted into a SQL Server database via SQL BulkCopy. It is possible that multiple instances of this .NET application run in parall...
.net sqlbulkcopy sql-server
asked by user115545

String conversion bug causes SqlBulkCopy to fail.

I have a view which generates a number of columns which I want to bulk load into another table which has identically named columns....This procedure worked fine when I was looping over the SqlDataReader and doing an insert with SqlParameters using a SqlCo...
.net sql sqlbulkcopy
asked by Tim Ebenezer

SqlBulkCopy. BulkCopyTimeout is not always respected by WriteToServer.

I need to count sequential timeout exceptions from SqlBulkCopy. To test this, I use an external app to start a transaction & lock up the target table. ...Only on the first call does SqlBulkCopy throw a timeout exception when expected. We've tried using an...
.net c# sqlbulkcopy sql-server-2008 timeout
asked by Paul Smith

Entity Framework and SqlBulkCopy

My current project consists of 3 standard layers: data, business, and presentation. I would like to use data entities for all my data access needs. Part of the functionality of the app will that it will need to copy all data within a flat file into a da...
.net c# entity-framework sqlbulkcopy
asked by Skadoosh

ThreadPool problem while using SqlBulkCopy in a multithread situation

I'm facing a dilemma (!)....In a first scenario, I implemented a solution that replicates data from one data base to another using SQLBulkCopy synchronously and I had no problem at all....Now, using ...ThreadPool..., I implemented the same in a assynchro...
.net c# sqlbulkcopy threadpool
asked by Soulbe

On SQL Server 2000, SqlBulkCopy creates a deadlock.

I have a customized data import executable in .NET 3.5 which the SqlBulkCopy to basically do faster inserts on large amounts of data. The app basically takes an input file, massages the data and bulk uploads it into a SQL Server 2000. It was written by a ...
.net asp.net sql sqlbulkcopy sql-server
asked by stevenjmyu

How can I locate the problematic column? Converting from string to int32 is not possible.

I am using SqlBulkCopy. So I made a datatable and specifed it's columns then added rows to the datatable and then try to insert it....System.InvalidOperationException was unhandled by user code Message=The given value of type String from the data ...
.net c# datatable sqlbulkcopy
asked by chobo2

SqlBulkCopyColumnMappingCollection: How to Use

I want to make one SqlBulkCopy method that I can use for all my bulk inserts by passing in specific data through the parameters....Now I need to do mapping on some of them. I don't know how to make a SqlBulkCopyColumnMappingCollection since that was my pl...
.net c# columnmappings sqlbulkcopy
asked by chobo2

After an exception, the SQL Server.NET SqlBulkCopy class continues to operate.

I'm inserting lot of data with a SqlBulkCopy. The source of the data may have some duplicated rows. I the destination table I have an index of uniqueness....When the first duplicated row appears, the SqlBulkCopy throws an exception and rollback the intern...
.net bulkinsert exception-handling sqlbulkcopy sql-server
asked by Diego

How can I put data into a table in a non-default database schema using SqlBulkCopy?

I need to insert data into a table in a schema named ...Staging... using ...SqlBulkCopy.......It appears the API only allows you to set the target table name by using the ...DestinationTableName... property....How do I accomplish this? Is it possible?
.net database-schema schema sqlbulkcopy
asked by Jon Seigel

Different collations of SqlBulkCopy

I need to migrate data from one DB to another. I choosed to use SqlBulkCopy, but have a problem with it, because source database has different collation than destination, so, I've got an exception:...System.InvalidOperationException: The locale id '1049' ...
.net sqlbulkcopy sql-server
asked by Victor Haydin

With SqlBulkCopy, the timeout has elapsed.

I'm using SqlBulkCopy to restore tables from xml backups. One of the table backup is ~200MB large and has a lot of records....I'm having error:...Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not respond...
.net asp.net sql sqlbulkcopy sql-server
asked by HasanG

Identity issue while uploading a csv file to a SQL server

Given a column structure in a CSV file of:...First_Name, Last_Name, Date_Of_Birth ...And a SQL Server table with a structure of...ID(PK) | First_Name | Last_Name | Date_Of_Birth ...(Field ID is an Identity with an auto-increment of 1)...How do i arrange i...
.net c# csv sqlbulkcopy sql-server
asked by MrBliz

SqlBulkCopy - Is it useful for tiny datasets (less than 1000 rows)?

Before I go to the trouble of implementing SqlBulkCopy and performance test it, I was wondering if anyone had any guidance on when it should be used and if it is preferable to use even on relatively small data sets (1000 or so rows). Is there any overhead...
.net performance sqlbulkcopy
asked by Paul Hiles

How do I convert a generic list to a DataReader in.NET?

Hi I have a Populated Generic List in a winform and now wanna to send its data into a SQL server table as a bulk Copy. As I read the SqlBulkCopy Class, it needs a data reader as a source....Now, how can I convert it to a DataReader?...Thank you
.net generic-list sqlbulkcopy sqldatareader winforms
asked by odiseh

Page 1 of 4
  • 1
  • 2
  • 3
  • 4
  • ยป

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!