Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
hi,

Please let me know the best way to Upload 30,000 rows of data in sql server 2008 database from c# in one go.


Waiting For your Reply.

Thanks & Regards.
Posted
Comments
Sandeep Mewara 1-Aug-12 2:21am    
Why 1 go? Why not in batches?

Use the sql bulk copy class. Its designed for exactly this purpose. Check details on MSDN.
 
Share this answer
 
Check artilces: Bulk INSERT / UPDATE / DELETE in LINQ to SQL[^]
If you do as Sandeep suggests, then please:Batch Update on a very huge table[^]
 
Share this answer
 

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