Fastest way to load data

S

Sehboo

I have to call a stored procedure which returns about 1000 rows with
about 5 fields (most of them are int).

What is the fastest way to load this data?

if I just do DataTable.Load, then is it fast? or should I do something
else?

Thanks
 
G

Guest

You can either get a DataReader or a DataSet. DataReader keeps the open
connection and is "Firehose" style one way access through your data. If you
need to be able to work with the data after closing the connection, then you
need to get a DataSet. DataSet has more overhead, but with only 1000 rows and
5 columns, you would never be able to notice the difference. Check out the
QUICKSTARTS samples for example code.
Peter
 
S

susiedba

I would just use BULK INSERT

ADO.net doesn't have _HALF_ of the performance / functionality as ADO
Classic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top