469,602 Members | 1,984 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Pagination of data

Hi

I am developing a vb2005/sql server 2005 winform app which involves
displaying records in a list, one page at a time. The total number of
records is large. I am wondering if there is a way either in vb/ado or sql
server that automatically pages a certain number of records at a time and
when user scrolls down (or up) pages the next set of records? I guess I can
possibly program it manually but it may be complicated specially when the
records in the next/previous set are different due to the different sort
orders. Ideally I am looking for giving a select statement to include all
records as data source and then expect system to handle any pagination and
bringing only one page of record from server at any one time.

Thanks

Regards
Nov 21 '05 #1
5 1138
Take a look at this article.
http://www.aspfaq.com/show.asp?id=2120

--
David Portas
SQL Server MVP
--
Nov 21 '05 #2
I am doing it for a winform app and asp may not be relevant but I will have
a look.

Thanks

Regards
"David Portas" <RE****************************@acm.org> wrote in message
news:IZ********************@giganews.com...
Take a look at this article.
http://www.aspfaq.com/show.asp?id=2120

--
David Portas
SQL Server MVP
--

Nov 21 '05 #3
Of the various solutions given, most of them are not ASP-specific. Mostly
they use TSQL.

--
David Portas
SQL Server MVP
--
Nov 21 '05 #4
Hi John,

I am not a DBA or even half-experienced db developer but, I guess you could
consider achieving your goal by using views. You will still, as you state,
return the whole recordset and possibly 'store it' as a dataset. You can
then create the required views as needed. If there are any DBA's reading
PLEASE don't lecture on the bad practice of returning more records than
required....IT'S NOT MY IDEA! :-) :-)

I know you asked if there was a way to do this 'automatically', but I don't
know of one, other than the built-in methods within the asp datagrid. Sorry
if this is not helpful.

Good luck.

Phil

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
Hi

I am developing a vb2005/sql server 2005 winform app which involves
displaying records in a list, one page at a time. The total number of
records is large. I am wondering if there is a way either in vb/ado or sql
server that automatically pages a certain number of records at a time and
when user scrolls down (or up) pages the next set of records? I guess I
can possibly program it manually but it may be complicated specially when
the records in the next/previous set are different due to the different
sort orders. Ideally I am looking for giving a select statement to include
all records as data source and then expect system to handle any pagination
and bringing only one page of record from server at any one time.

Thanks

Regards

Nov 21 '05 #5
Check out:

http://www.aspfaq.com/show.asp?id=2120

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Phil G." <Ph**@nospam.com> wrote in message
news:de**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
Hi John,

I am not a DBA or even half-experienced db developer but, I guess you could
consider achieving your goal by using views. You will still, as you state,
return the whole recordset and possibly 'store it' as a dataset. You can
then create the required views as needed. If there are any DBA's reading
PLEASE don't lecture on the bad practice of returning more records than
required....IT'S NOT MY IDEA! :-) :-)

I know you asked if there was a way to do this 'automatically', but I don't
know of one, other than the built-in methods within the asp datagrid. Sorry
if this is not helpful.

Good luck.

Phil

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
Hi

I am developing a vb2005/sql server 2005 winform app which involves
displaying records in a list, one page at a time. The total number of
records is large. I am wondering if there is a way either in vb/ado or sql
server that automatically pages a certain number of records at a time and
when user scrolls down (or up) pages the next set of records? I guess I
can possibly program it manually but it may be complicated specially when
the records in the next/previous set are different due to the different
sort orders. Ideally I am looking for giving a select statement to include
all records as data source and then expect system to handle any pagination
and bringing only one page of record from server at any one time.

Thanks

Regards

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Kruq | last post: by
2 posts views Thread by s4lin | last post: by
1 post views Thread by shalini jain | last post: by
16 posts views Thread by gnawz | last post: by
2 posts views Thread by kkshansid | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.