Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Can I copy my DataReader record to DataSet (or others?), because DataReader is linked to Database, I need to disconnect it, but I still need to process it's content...

 

If there anyway?

Posted
Yes you can, simply loop through the datareader and add them to a dataset, but again why dont you simply use the dataset instead ??
Dream as if you'll live forever, live as if you'll die today
Posted

I have to loop throught the datareader and add them one by one in dataset? No simple way?

 

I just don't want to change much of my code, so looking for simple way.

 

Thank you for your reply

Posted

Loop ? I guess so, I dont think there is a simpler way.

 

But why dont you want to loop, It is only 4 to 5 lines of code to add each record to the dataset.

 

And SqlReaders are very fast so you need not worry about the speed of your loop. Readers were made for that...

Dream as if you'll live forever, live as if you'll die today

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...