Home All Groups Group Topic Archive Search About

Refreshing sqldatareader after read method [vb.Net]

Author
15 Feb 2006 11:36 AM
Hardik Shah
Hi,

I want to refresh (get first record) again after calling .read method once.
I give following command but second loop doesn't give any output.

While myreader.read    ' myreader is a sqldatareader
    console (myreader.item("field_nm")
end while

While myreader.read    ' myreader is a sqldatareader
    console (myreader.item("field_nm")
end while

Thanks in advance.

Hardik Shah

Author
15 Feb 2006 1:21 PM
Kerry Moorman
Hardik Shah,

The data reader is forward only. Once you have read past a record you cannot
read that record again.

Kerry Moorman


Show quote
"Hardik Shah" wrote:

> Hi,
>
> I want to refresh (get first record) again after calling .read method once.
> I give following command but second loop doesn't give any output.
>
> While myreader.read    ' myreader is a sqldatareader
>     console (myreader.item("field_nm")
> end while
>
> While myreader.read    ' myreader is a sqldatareader
>     console (myreader.item("field_nm")
> end while
>
> Thanks in advance.
>
> Hardik Shah
>
>
>

AddThis Social Bookmark Button