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

SqlBulkCopy Tutorial - Knowledge Base (KB)

641 results

Connection property has not been initialized in WriteToServer. sqlbulkcopy failure

running sqlbulkcopy in c# and I get an error: WriteToServer: Connection property has not been initialized....it happens at the WriteToServer command. The connection is open....using (SqlBulkCopy s = new SqlBulkCopy(conn)) { foreach (DataTable dt in ds....
c# sqlbulkcopy
asked by Chris Hayes

Improving the performance of thousands of Insert queries in SQL Server 2005. 120ms logout-login time

Can somebody shed some lights on how SQL Server 2005 deals with may request issued by a client using ADO.NET 2.0. Below is the shortend output of SQL Trace. I can see that connection pooling is working (I believe there is only one connection being pooled)...
bulkinsert flat-file import sqlbulkcopy sql-server-2005
asked by Rad

Multiple threads process a flat file in pieces using the producer/consumer pattern and SqlBulkCopy into a SQL Server database.

I hope you will bear with me. I wanted to provide as much information as I can. The main problem is how to create a structure (like a stack) that will be used by multiple threads that will pop a value and use it to process one big flat file and possibly ...
c# flat-file multithreading sqlbulkcopy sql-server
asked by Rad

When copying data in sql, add a column

I'm using SqlBulkCopy to bulk insert some records from one table into another table. The query is using a SqlDataReader to get the data. The one difference that matters (besides column order which is handled in the mappings) between the tables is that t...
sql sqlbulkcopy sqldatareader sql-server-2008
asked by nelsonwebs

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

For mass copy, go backwards.

I have an application that make a copy from my database by bulk copy class in c#....Can I rollback the bulk copy action in sql server when occur an exception?
bcp c# rollback sqlbulkcopy sql-server
asked by masoud ramezani

Example of SqlBulkCopy WriteToServer. What am I doing incorrectly?

This might be long, but I want to explain my example...I got this Code:...#region [parent table] DataTable dtParent = new DataTable(); DataColumn dc; dc = new DataColumn(); dc.DataType = System.Type.GetType("System.Int32"); dc.ColumnName = "Id"; dc.Uniqu...
c# sql sqlbulkcopy sql-server
asked by Ash

From a typed List, create an IDataReader.

I have a ...List<MyObject>... with a million elements. (It is actually a SubSonic Collection but it is not loaded from the database). ...I'm currently using ...SqlBulkCopy... as follows:...private string FastInsertCollection(string tableName, DataTable ta...
c# linq sql sqlbulkcopy
asked by Jason Kealey

SqlBulkCopy's database engine independent counterpart

What is the best database engine independent way to load a huge amount of data....While I'm using SQL Server I use SqlBulkCopy but want to untie from SQL Server
database-independent sql sqlbulkcopy sql-server
asked by abatishchev

bcp command execution incoherence

I execute a bcp command in 2 computer. The first computer has windows xp and second one has windows server 2003. when I execute command in first, the bcp run successfully but when I run this on second one, occur this error:...Starting copy... SQLState = S...
bcp sqlbulkcopy sql-server
asked by masoud ramezani

How can I make a datatable with gridview rows?

I have a gridview which will contain some 'n' number of rows.... Now i want to add all rows of the gridview to a datatable which will be used for bulkcopy operation......I have found this ...http://www.codeproject.com/KB/aspnet/GridView_To_DataTable.aspx...
c# datatable gridview sqlbulkcopy
asked by ACP

I'm having trouble using sqlbulkcopy.

I have created a datatable and trying to insert that datatable through SqlBulkCopy but somehow it doesn't seem to work for me.... ...I got the error,...The given value of type DateTime from the data source cannot be converted to type decimal of the specif...
c# sqlbulkcopy sql-server-2005
asked by ACP

How to put a DataTable into a SQL Server Table with an Existing Key

I am working with VB.NET.. i have a DataTable called "QUESTION", containing 3 fields:...QuestionNumber (unique integer key)...QuestionText...QuestionType...In my SQL Server database I created a Table called "QUESTION" with the same fields. QuestionNumber ...
database datatable sqlbulkcopy sql-server vb.net
asked by Olga

How to use SQL bulk copy to retrieve the IDs of added data records

I have an ADO.NET ...DataTable... with about 100,000 records. In this table there is a column ...xyID... which has no values in it, because the column is an auto-generated ...IDENTITY... in my SQL Server database....I need to retrieve the generated IDs f...
ado.net database identity sqlbulkcopy sql-server
asked by Olga

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

When there is no primary key, how can SqlBulkCopy prevent duplicate entries from being inserted?

I receive a daily XML file that contains thousands of records, each being a business transaction that I need to store in an internal database for use in reporting and billing. I was under the impression that each day's file contained only unique records, ...
c# sql sqlbulkcopy sql-server sql-server-2008
asked by kscott

Inserts in bulk using DBCC CheckIdent

Our team needs to insert a cruel amount of data into our SQL Server 2008 database. We're looking for a good solution. Now we came up with one, but I have doubts with it, simply because it doesn't feel right. So I'm asking here if this seems like a good so...
batch-processing dbcc sqlbulkcopy sql-server sql-server-2008
asked by Dennis van der Stelt

SqlBulkCopy is as sluggish as molasses.

I'm looking for the fastest way to load bulk data via c#. I have this script that does the job but slow. I read testimonies that SqlBulkCopy is the fastest.... 1000 records 2.5 seconds. files contain anywhere near 5000 records to 250k What are some of ...
c# sqlbulkcopy
asked by Chris Hayes

For bulk transfers, should I use MySqlDataAdapter or MySqlDataReader?

I'm using the MySql connector for .NET to copy data from MySql servers to SQL Server 2008....Has anyone experienced better performance using one of the following, versus the other?...DataAdapter and calling Fill to a DataTable in chunks of 500...DataReade...
mysql sqlbulkcopy sql-server
asked by Jeff Meatball Yang

Page 3 of 33
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • »
  • »»

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!