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

SqlBulkCopy Tutorial - Knowledge Base (KB)

74 results for: in tag: .net

What's the best way to use SqlBulkCopy to fill a really large table?

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 with table definitions & relations (but not data) from SQL Server

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

SqlBulkCopy and DataTables with Parent/Child Relation on Identity Column

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

Truncate before SqlBulkCopy

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 table with composite primary key

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

SQL Bulkcopy for Client / Parent relationship

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

SqlBulkCopy failing with String conversion issue

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.WriteToServer not reliably obeying BulkCopyTimeout

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

SqlBulkCopy and Entity Framework

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

Using SqlBulkCopy in a multithread scenario with ThreadPool issue

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

SqlBulkCopy causes Deadlock on SQL Server 2000

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 to find offending column? Can't Convert from string to int32

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

How to use SqlBulkCopyColumnMappingCollection?

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

SQL Server .NET SqlBulkCopy class keep running after exception

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

Using SqlBulkCopy, how do I insert data into a table in a non-default database schema?

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

SqlBulkCopy with different collations

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

Timeout expired with SqlBulkCopy

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

Uploading a csv file to sql server - Identity problem

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 - Useful on smaller datasets (ie 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

.net: Converting a Generic List to a DataReader?

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...