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

SqlBulkCopy Tutorial - Knowledge Base (KB)

360 results in tag: c#

SqlBulkCopy Doesn't Work

I have a ...DataSet... populated from Excel Sheet. I wanted to use SQLBulk Copy to Insert Records in ...Lead_Hdr... table where ...LeadId... is PK. ...I am having following error while executing the code below:...The given ColumnMapping does not match up ...
asp.net c# sqlbulkcopy
asked by Sandhurst

Error handling in sqlbulkcopy / continue on error

I am trying to insert huge amount of data into SQL server. My destination table has an unique index called "Hash". ...I would like to replace my SqlDataAdapter implementation with SqlBulkCopy. In SqlDataAapter there is a property called "ContinueUpdateOn...
ado.net c# sqlbulkcopy
asked by Paladin

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

Is sqkbulkcopy a table schema replacement?

I was inserting bulk data from C# code using sqlbulkcopy.There were 15000 records in temp_upload table.Now somehow the datatable in WriteToServer() method had just one column and 37 rows....After running it I found that the table just had 37 records.Initi...
c# sqlbulkcopy
asked by Rohit Raghuvansi

How can I use an ODBC connection to conduct a SqlBulkCopy (equivalent) in C#?

I am working on a project where I need to extract data from a MSSQL database table, and then insert the data into a table of the same structure on an AS400....The SqlBulkCopy would be the ideal candidate for this operation, but fails (understandably) beca...
c# ibm-midrange odbc sqlbulkcopy sql-server
asked by Matt

Using sql CE and sqlbulkcopy

Is it possible to use SqlBulkcopy with Sql Compact Edition e.g. (*.sdf) files?...I know it works with SQL Server 200 Up, but wanted to check CE compatibility....If it doesnt does anyone else know the fastest way of getting a CSV type file into SQL Server ...
c# sqlbulkcopy sql-server-ce
asked by Mark H

Windows Service and ODBC

I'm new to windows services and... you guessed it, I’m a bit stuck. Let me paint the picture –...I’m running a timed service that use an OdbcDataReader and SqlBulkCopy to (1) archive the data (2) normalize the data on a SQL box. When I run this code...
c# odbc sqlbulkcopy windows-services
asked by DNS

Before putting into the database, convert String to bit.

Can anyone help in converting string value in C# to bit equivalent in Sql. I'm trying to bulkcopy the values of a datatable into Sql table. All the values I've in the datatable are in string format. When I try to bulkcopy to SQL table I'm getting an er...
asp.net c# sql sqlbulkcopy sql-server
asked by vix

Is it possible to utilize SqlBulkCopy without having to convert the data to a DataTable?

Is there a way to use SqlBulkCopy without converting the data to a DataTable? I have a list of objects (List) in RAM and I really don't want to use more memory to create the DataTable. Could it be possible to implement IDataReader on a List?...Thanks!
c# sqlbulkcopy sql-server
asked by Martin

SqlBulkCopy error

i use SqlBulkCopy to insert data from OleDbDataReader (contains data from xls) to mssql-2005 i have a cloumn on the OleDbDataReader that contains number stored as text (in the xls) ...when i look into the mssql data i see null in that column all other c...
asp.net c# sqlbulkcopy sql-server-2005
asked by eyalb

SQlBulkCopy throws a System.InvalidOperationException.

I got the following error when executing bulkcopy....System.InvalidOperationException The given value of type String from the data source cannot be converted to type decimal of the specified target column. ...I use the following code....DataTable empTabl...
c# invalidoperationexception sqlbulkcopy
asked by ACP

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

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

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

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

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

BulkCopy in SQl Questions

I am wondering how can do a mass insert and bulk copy at the same time? I have 2 tables that should be affect by the bulk copy as they both depend on each other. ...So I want it that if while inserting table 1 a record dies it gets rolled back and table 2...
c# sqlbulkcopy sql-server sql-server-2005
asked by chobo2

Is it possible to recover PrimayKey IDs after a SQL BulkCopy?

I am using C# and using SqlBulkCopy. I have a problem though. I need to do a mass insert into one table then another mass insert into another table....These 2 have a PK/FK relationship....Table A Field1 -PK auto incrementing (easy to do SqlBulkCopy as str...
c# sql sqlbulkcopy sql-server-2005
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

Page 1 of 18
  • 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!