Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: reading sqldatareader after conn.close()

Thread Tools

Re: reading sqldatareader after conn.close()

Ante Perkovic
Posts: n/a
"Naveen K Kohli" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> DataReader is not exactly but sort of a connected recordset. Meaning when it
> starts reading from DB, it does not know records before hand. It reads them
> one at a time and streams them to the caller. It does not keep any thing in
> memory. Once you have read one record it forgets about it. And once you have
> read all records. You can't go back. After closing the connection you can't
> use the same data reader unless you open a new connection for it.


Can I do smt. like in code below?

Function whatever (...) as sqldatareader
mydatareader = blabla.executeReader
return mydatareader
End function

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SqlDataReader showing Empty columns until after error. lithoman ASP .Net 13 12-08-2006 12:15 PM
SQLDataReader stops responding after reading. elitehunter99 ASP .Net 0 10-17-2006 01:03 PM
Two SqlDataReader for the same connection Ruslan ASP .Net 3 01-13-2004 07:52 AM
Reading SqlDataReader or DataRow Michael Carr ASP .Net 4 12-01-2003 05:23 AM
DataGrid Custom Paging using SQLDataReader Paul Hobbs ASP .Net 1 07-24-2003 04:00 PM