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

SqlBulkCopy Tutorial - Knowledge Base (KB)

English (en) Français (fr) Español (es) Italiano (it) Deutsch (de) русский (ru) 한국어 (ko) 日本語 (ja) 中文简体 (zh-CN) 中文繁體 (zh-TW)

357 results for: in tag: c#

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

SqlBulkCopy Not Working

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

SqlBulkCopy Error handling / 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

Error inserting data using SqlBulkCopy

I'm trying to batch insert data into SQL 2008 using ...SqlBulkCopy.......Here is my table:...IF OBJECT_ID(N'statement', N'U') IS NOT NULL DROP TABLE [statement] GO CREATE TABLE [statement]( [ID] INT IDENTITY(1, 1) NOT NULL, [date] DATE NOT NULL DEFAUL...
ado.net c# datetime sqlbulkcopy sql-server
asked by abatishchev

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

Does sqkbulkcopy replace table schema?

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

How can I perform an SqlBulkCopy (equivalent) using an ODBC connection 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

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

sqlbulkcopy using sql CE

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 harrisonmeister

ODBC and Windows Service

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

Converting String to bit before inserting into the database

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 there a way to use SqlBulkCopy without converting 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 problem

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 with SqlHelper class

I've installed ...DataAccessApplicationBlock.msi... and I got the ...Microsoft.ApplicationBlocks.Data.dll... file into my bin folder. I found every other sqlhelper methods except ...ExecuteBulkCopy.......How do I add ...ExecuteBulkCopy... function to the ...
c# data-access sqlbulkcopy sqlhelper
asked by Chendur Pandian

System.InvalidOperationException with SQlBulkCopy

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 Chendur Pandian

WriteToServer: Connection property has not been initialized. sqlbulkcopy error

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

Processing a flat file in chunks using multiple threads using producer/consumer pattern and SqlBulkCopy into SQL Server DB

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

SqlBulkCopy WriteToServer example. What am I doing wrong?

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

Get an IDataReader from a typed List

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

How to add gridview rows to a datatable?

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 Chendur Pandian

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