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

SqlBulkCopy Tutorial - Knowledge Base (KB)

22 results for: in tag: ado.net

SqlBulkInsert - How to set Fire Triggers, Check Constraints?

I'm performing a bulk insert with an ADO.NET 2.0 SqlBulkCopy object from a C# method into a MS SQL 2005 database, using a database user with limited permissions. When I try to run the operation, I get the error message:...Bulk copy failed. User does not ...
ado.net sqlbulkcopy sql-server-2005
asked by James Orr

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 refuses to convert String.Empty into INT NULL

Recently I've been tasked with creating an automated ETL process that pumps the data into tables based on the flat file name by reading a master mapping file. I've decided to go with SqlBulkCopy and everything seemed to be fine. IDataReader interface was ...
ado.net c# sqlbulkcopy sql-server-2005
asked by a_person

How to get identities of inserted data records using SQL bulk copy

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

Inserting Bulk Data in SQL: OLEDB IRowsetFastLoad vs. Ado.Net SqlBulkCopy

I am evaluating different methods for inserting large amount of data in SQL server. I've found ...SqlBulkCopy... class from Ado.Net and ...IRowsetFastLoad... interface from OLEDB. As far as I know, IRowsetFastLoad doesn't map to C#, which is my base plat...
ado.net oledb sqlbulkcopy sql-server
asked by Nicolas Irisarri

Managing a Network failure during a Transactional SqlBulkCopy

I'm researching SqlClient's SqlBulkCopy in ADO.Net and have the following questions....What will happen, if there was a network error during a ...SqlBulkCopy... operation, running under as part of a transaction over a huge number of records? ...Will the t...
ado.net c# sql sqlbulkcopy
asked by FMFF

How to efficiently invoke table-valued parameters from Ado.Net

I need to efficiently submit tens of thousands of numbers and dates from Ado.Net to SQl Server 2008. Back in the days, before SQL 2008, I was packing those numbers in an image, which was quite fast. Erland Sommarskog was kind enough to include some of my ...
ado.net bulkinsert sqlbulkcopy sql-server sql-server-2008
asked by A-K

How can I set column type when using SqlBulkCopy to insert into a sql_variant column

I'm using SqlBulkCopy to insert/update from a .net DataTable object to a SQL Server table that includes a sql_variant column. However SqlBulkCopy insists on storing DateTime values put into that column as sql type 'datetime' when what I need is 'datetime...
ado.net datatable sqlbulkcopy sql-server sql-variant
asked by BowserKingKoopa

SQLBulkCopy and Dates (1/1/1753)

I've got an application which has been working fine for quite a while, but there is an annoying item that continues to get in the way on occasion. ...Let's say that I use an object such as OracleDataReader or MySQLDataReader to pass the data to the sqlbul...
ado.net datetime sqlbulkcopy sql-server
asked by mdjtlj

Delete not working in transaction with sql bulk insert

I need to delete some records from table and then insert some records to the same table. This delete and insert process should be in transaction....Below is what i did.... using (SqlConnection sqlConn = new SqlConnection(connectionString)) { ...
ado.net c# sqlbulkcopy sql-server-2008 transactions
asked by Muthukumar

Inserting a single row with large number of columns in SQL Server

I have a huge form that has around 110 ...fields... columns (single row) that need to be saved in a database. ...What is the best approach to insert these many columns into the database using ADO.NET?...I don't think I should be using an insert statement ...
ado.net bulkinsert sqlbulkcopy sql-server
asked by Animesh

Cannot access database through linked server

I am using the SqlBulkCopy Feature to store bulk data in to Sql database....For Ex: bulkCopy.DestinationTableName = "employeetable". This code works fine. But In a scenario, where i don't have access to the Destination database directly through Connection...
ado.net c# exception-handling linked-server sqlbulkcopy
asked by Boopal

What is the difference between giving BatchSize and not giving BatchSize for OracleBulkCopy

Can anybody give the performance & behavior difference between using ...BatchSize... and without using ...BatchSize... in ...OracleBulkCopy.... Currently I don't specify ...BatchSize.... My ...BatchSize... may vary from 100 to 200000. Please suggest the b...
ado.net c# oracle sql sqlbulkcopy
asked by user1887523

Bulk copy with dynamic created temp table in ADO.NET

I require to create through ADO.NET a temp table, perform a ...BulkCopy... and then a ...Merge... on the server between the temp and the actual table....Problem is creating the temp table dynamic using pure ADO.NET. The schema should be the same as the ex...
ado.net sqlbulkcopy
asked by Ronald

Speeindg up Entity Framework Inserts

I'm working on an order system that can have anywhere from 1 to 200+ orders in it. Right now we have a loop that loops through each order and inserts it into the database. Would it make sense to use SqlBulkCopy? Would using it degrade performance on small...
ado.net entity-framework sqlbulkcopy sql-server-2008
asked by chobo

SqlBulkcopy .net 4.0 cannot access destination table

I have written a program that in .net that should copy tables data from one server to another. However I am getting an error:...cannot access destination table "mytable" ...Despite googling and looking everywhere I cannot find a solution to the error I am...
ado.net c# sqlbulkcopy
asked by developer9969

SqlBulkCopy - Add rows along with additional values to database

I am trying a code snippet that add excel data into sql database using SqlBulkCopy. The code snippet is as given below...OleDbConnection connection=null; string FilePath=""; try { if (FileUpload1.HasFile) ...
ado.net asp.net c# sqlbulkcopy sql-server
asked by user2363957

Supplying stream as a source of data for a binary column when SqlBulkCopy is used

If one needs to read data ...from... SqlServer in a streamed fashion, there are some capabilities for that. Such as using ...SqlDataReader... with ...CommandBehavior.SequentialAccess..., and particularly when binary column data needs to be accessed there ...
ado.net c# idatareader sqlbulkcopy sql-server
asked by i-one

Unable to get updated value from method of other class

Below is my class:...MsSql.cs:...public class MSSqlBLL { public static long RowsCopied { get; set; } public long BulkCopy() { using (SqlBulkCopy bulkCopy = new SqlBulkCopy(conn)) { bulkCopy.DestinationTableName = "...
.net ado.net c# sqlbulkcopy
asked by Learning-Overthinker-Confused

Page 1 of 2
  • 1
  • 2
  • ยป

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...