Friday, March 9, 2012

Paging

Is there any way to implement a paging scheme such that only the required records are transferred from SQL Server to the asp.net app?

The only support I can find such as the DataAdaptor.Fill will bring all the records back from SQL Server and then create the page...

This obviously still takes time and memory based on the entire query, not the page size.

Any ideas?Hi,

You can use a temporary table via stored proc in SQL Server. Seehere andhere.

Another approach is to use SELECT TOP, seehere.

A.|||Thanks... Very useful...

Having a fully dynamic query built up in asp.net, without necessarily being from a single table and having unknown (in advance) columns, without always having a primary key I'm not sure that I will be able to adapt one of these without doing some major work on my system.

No comments:

Post a Comment