views:

131

answers:

1

Hi! I'm new to ADO.NET so asking for help. I have to insert large number of records in one table.

What is best-practice, effective and easy way to do that? I found an article called Batch Requests (ADO.NET Data Services Framework) but it isn't clear for me.

Also I found an article about BULK INSERT but such method uses external file, I don't want to use it because of having an ASP.NET application.

+5  A: 

Look at the SqlBulkCopy class. Also it sounds obvious, but not everyone knows this- you can significantly speed up insert performance by using transactions- I've blogged about this before.

RichardOD