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

SqlBulkCopy Tutorial - Knowledge Base (KB)

641 results for:

How to keep row order with SqlBulkCopy?

I'm exporting data programatically from Excel to SQL Server 2005 using SqlBulkCopy. It works great, the only problem I have is that it doesn't preserve the row sequence i have in Excel file. I don't have a column to order by, I just want the records to be...
excel export import sqlbulkcopy sql-server
asked by roman m

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

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

Does SQLBulkCopy dramatically increase the .mdf file size?

I am using the SqlBulkCopy class to do a bulk insert into a SQLServer DB....Original size of the .mdf file associated with the DB is 1508 Mb.... When I run it (on the same data of about 4 million records) with :... BatchSize of 100000, the size of the .md...
sqlbulkcopy sql-server
asked by Pratik Stephen

SqlBulkCopy does not copy strings > 255 characters long

I am trying to copy a large Excel spreadsheet into the SQL Server database. I am opening an OldDbConnection to the Excel spreadsheet and reading everything from the [Sheet1$]. Then, I am using the OleDbCommand to get a IDataReader with the spreadsheet dat...
excel sqlbulkcopy
asked by hpatel298

SQL CLR SqlBulkCopy from DataTable

We have an in memory DataTable in a CLR procedure. After significant processing the DataTable has a lot of data that we need to load into a table in the database. Unfortunately, since we are using a ...context connection... SqlBulkCopy will not work (thr...
clr sql sqlbulkcopy sqlclr sql-server
asked by ahsteele

Add text when using SQLBulkCopy to SQL Server from excel

I've created a page where our partners can upload excel files with statistics using SQLBulkCopy. The file has multiple sheets and I need to add the name of the sheet into a column in the DB for each row. The names of the sheets will not change so hardcodi...
asp.net import-from-excel sqlbulkcopy
asked by Marcus Lindholm

How do I Import table from an ODBC Database?

I have an ODBC Database (some third party DB) where I have a bunch of tables. I am able to use 'GetSchema' to get a list of tables in there. I am also abe to utilize SQLBulkCopy to copy Data from these tables to SQL Server tables (only when I have created...
odbc sqlbulkcopy sql-server
asked by R D

What's the drawback of SqlBulkCopy

I have done some research for "The bast way to insert huge data into DB with C#" then a lot of people just suggested me using SqlBulkCopy. After I tried it out and it really amazed me. Undoubtedly, SqlBulkCopy is very very fast. It seems that SqlBulkCopy ...
sqlbulkcopy
asked by Edison Chuang

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

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 Row Count When Complete

I am using SQLBulkCopy to move large amounts of data. I implemented the notification event to notify me every time a certain number of rows have been processed, but the OnSqlRowsCopied event does not fire when the job is completed. How do I get the tota...
sqlbulkcopy sql-server
asked by SchwartzE

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

Import data from SQLite to SQL Server with SqlBulkCopy class

I'm trying to transfer the data from SQLite to SQL Server. The schema of target and destination table are just the same:...SQL Server:...CREATE TABLE [dbo].[Shop] ( [ShopID] [int] IDENTITY(1,1) NOT NULL, [Name] [nvarchar](128) NOT NULL, [Url] ...
sqlbulkcopy sqlite
asked by Jeffrey Zhao

Do I need all database columns in my DataTable for SqlBulkCopy WriteToServer?

I'm importing some data from a CSV, and it doesn't have all the fields my table does. I was making a DataTable with only the columns of my CSV, but I'm getting errors about converting from String to Boolean. None of the fields I'm adding are Boolean, so...
datatable sqlbulkcopy
asked by Thomas

Writing from SQL Server table to file using BCP

I just realized my caps was on from working in SQL Server, ha. ...Anyways, Im trying to write from ...serverName.databaseName.databaseInstanceName.TableName...to ...C:\FileName.xml...using ...bcp... and I want to write only columns ...Col1... and ...Col2....
command-line sqlbulkcopy sql-server
asked by tb.

At which stage does SqlBulkCopy check constraints?

If SqlBulkCopyOptions.CheckConstraints option is set for SqlBulkCopy insert, does it check the constraints separately after each record, or after all records are inserted?...I have a check constraint that compares some columns to the parent row (through a...
constraints sqlbulkcopy sql-server-2005
asked by Riikka Heikniemi

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