Click here to Skip to main content
16,005,467 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
How i can do bulk copy in c# using sql server 2008?How can i translate bulk amount of data in one process to the database table?
Posted
Comments
King Fisher 18-Feb-14 4:43am    
You wanna copy data from table1 to table2 ..?
Jinu Jacob 18-Feb-14 5:49am    
From list box to database table..

SQL Bulk Copy with C#.Net[^]

Regards,
Praveen Nelge
 
Share this answer
 
v2
If you want to copy bulk data from datatable to database table use below code
C#
// copying the data from datatable to database table
         using (SqlBulkCopy bulkcopy = new SqlBulkCopy(connection))
         {
             bulkcopy.DestinationTableName = "table1";
             bulkcopy.WriteToServer(dt);
         }
 
Share this answer
 
v2
You should save the data as byte array into a SQL field of type "image".
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900