Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
How can I insert the entire dataTable in database(Sql Server) at once is there any method through which I can do the same?
Posted
Updated 2-Sep-13 21:47pm
v3

1 solution

Absolutely.

Use System.Data.SqlBulkCopy.WriteToServer[^], that shows how to insert a data table.
 
Share this answer
 
Comments
Joezer BH 3-Sep-13 3:45am    
5ed!
Ron Beyer 3-Sep-13 3:48am    
Thanks!
Joezer BH 3-Sep-13 4:13am    
Most welcome ;)
I like that kind of posts - that's the perfect laconic answer
Tilak Rathour 4-Sep-13 3:22am    
Thanks Ron Beyer

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