Questions tagged [sqlbulkcopy]

Lets you efficiently bulk load a SQL Server table with data from another source.

The SqlBulkCopy class can be used to write data only to SQL Server tables. But the data source is not limited to SQL Server; any data source can be used, as long as the data can be loaded to a DataTable instance or read with a IDataReader instance.

Using the SqlBulkCopy class, you can perform:

  • A single bulk copy operation
  • List item Multiple bulk copy operations
  • List item A bulk copy operation within a transaction

Link to Microsoft Help Documentation: Microsoft SqlBulkCopy Documentation

964 questions
-3
votes
1 answer

sql bulk insert c# in asp.net

i want to insert 10000+ rows in my database fast (I tried with linqtosql and it took me more than 2 minutes) and after a research on the internet I found out about SQL Bulk Copy, but I am don't really understand it. Can someone give me a good…
L. Achilles
  • 123
  • 1
  • 2
  • 14
-3
votes
4 answers

Import from excel to Sql Server

I have a task to import excel data to Sql server. The excel data comes from excel templates. There are different excel templates available for different cleints so the columns in excel are not same accross all the templates. The data has to be…
Santosh
  • 12,175
  • 4
  • 41
  • 72
-4
votes
1 answer

Date format problem in C#? While retrieving data from Excel

Below is the image of my code please have a look on it. I am trying to retrieve data from excel sheet and storing it into database table through SQL bulkcopy. Error: The date format is 05-01-2019; it is inserted as 2019-05-01 (database) incorrectly…
-8
votes
1 answer

There is already an object in the database Exception

What's wrong with my code... I tried several things but getting the same error again and again. Any help?? The Code is: SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[SubDomainName].ToString()); conn.Open(); string…
user3226735
  • 11
  • 1
  • 4
1 2 3
64
65