This is a multi-part message in MIME format.

------=_NextPart_000_0056_01C4860D.6271F9B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Is there a way to setup paging with a data reader? For instance, I only =
want 10 records at a time, and I can move through the next ten when I =
need them. From the members that I saw listed in the MSDN library, it =
does not appear that there is. Can someone please help? Also, is there a =
way to find out the number of results that a stored procedure returns?
------=_NextPart_000_0056_01C4860D.6271F9B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Is there a way to setup paging with a =
data reader?=20
For instance, I only want 10 records at a time, and I can move through =
the next=20
ten when I need them. From the members that I saw listed in the MSDN =
library, it=20
does not appear that there is. Can someone please help? Also, is there a =
way to=20
find out the number of results that a stored procedure=20
returns?</FONT></DIV></BODY></HTML>

------=_NextPart_000_0056_01C4860D.6271F9B0--

Re: Paging a SqlDataReader in C# by Cowboy

Cowboy
Thu Aug 19 19:23:45 CDT 2004

A dataReader is a forward only cursor. You can roll your own, of course, but
the whole idea of the DataReader is you are simply streaming data in until
you get to the end. It does not even know how many records until it is done.

I would switch to a DataSet and be done with it.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"Jeremy Ames" <yourname@here.com> wrote in message
news:eM$dPbjhEHA.396@TK2MSFTNGP12.phx.gbl...
Is there a way to setup paging with a data reader? For instance, I only want
10 records at a time, and I can move through the next ten when I need them.
From the members that I saw listed in the MSDN library, it does not appear
that there is. Can someone please help? Also, is there a way to find out the
number of results that a stored procedure returns?



Re: Paging a SqlDataReader in C# by Jeremy

Jeremy
Fri Aug 20 13:50:12 CDT 2004

That worked well. I just had to teach myself how to use the dataset objects.
Thanks for your help.

"Cowboy (Gregory A. Beamer) [MVP]" <NoSpamMgbworld@comcast.netNoSpamM> wrote
in message news:uWEo1vkhEHA.2952@TK2MSFTNGP09.phx.gbl...
A dataReader is a forward only cursor. You can roll your own, of course, but
the whole idea of the DataReader is you are simply streaming data in until
you get to the end. It does not even know how many records until it is done.

I would switch to a DataSet and be done with it.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"Jeremy Ames" <yourname@here.com> wrote in message
news:eM$dPbjhEHA.396@TK2MSFTNGP12.phx.gbl...
Is there a way to setup paging with a data reader? For instance, I only want
10 records at a time, and I can move through the next ten when I need them.
From the members that I saw listed in the MSDN library, it does not appear
that there is. Can someone please help? Also, is there a way to find out the
number of results that a stored procedure returns?