DataReader to Dataset

C

Cylix

Sorry for the stupid question first, I am new on ADO.NET

I think one of most advantange to use ADO.NET vs ADO is the closed
connection recordset,
that is dataset in ADO.NET.

I am using sqlcommand to execute a store procedure and return a table,
and assign to a sqldatareader, but is sqldatareader read as connected
state?

How can I copy the table to a dataset(is it closed connection)?

My purpose are just keep the table(records) on memory in closed
connection status.

Thank you.
 
B

Benny S. Tordrup

Why not use the SqlDataAdapter and the Fill command? It internally uses a
SqlDataReader to fill the datatable in the dataset.

Best regards,

Benny Tordrup
 

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