ASP Paging with Stored Procedure

ASP Paging with Stored Procedure

am 06.05.2005 03:38:01 von Adam Knight

Hi all,

I am wanting to implement paging with asp & sql server 2000.
In mysql i would simply issue a 'Limit clause such as Limit 10,1'.

In sql server i know you use SET ROWCOUNT to specify the number of rows to
be returned. My difficulty is how do i get the starting row for my paging.

In simple terms i want to retrieve 'n' number of rows after record as
position 'i'.

How can i do this?

I have read through asp faq, and it has helped but still fuzzy on this
particular item.
I am prefering not to retrieve all records in a table and use ado to filter
them for performance reasons.

Help appreciated!!

Re: ASP Paging with Stored Procedure

am 06.05.2005 04:04:50 von reb01501

Adam Knight wrote:
> Hi all,
>
> I am wanting to implement paging with asp & sql server 2000.
> In mysql i would simply issue a 'Limit clause such as Limit 10,1'.
>
> In sql server i know you use SET ROWCOUNT to specify the number of
> rows to be returned. My difficulty is how do i get the starting row
> for my paging.
>
> In simple terms i want to retrieve 'n' number of rows after record as
> position 'i'.
>
> How can i do this?
>
> I have read through asp faq, and it has helped but still fuzzy on this
> particular item.

Which ASP FAQ?

The article at www.aspfaq.com is pretty definitive on this subjet, as well
as the article by Ken Schaeffer at www.adopenstatic.com.

If you've read either one, could you get more specific about exactly what is
eluding you?

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"