DataReader to Dataset

  • Thread starter Thread starter Cylix
  • Start date Start date
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.
 
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
 
Back
Top