Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Movefisrt, MovePrevious, MoveNext, Movelast..?

Author  Topic 

adbasanta
Posting Yak Master

120 Posts

Posted - 2013-01-01 : 19:35:51
Good day!

I am having a little slow performance loading 10,000 items in one instance. I have decided to load the items @ 500 per records with the following buttons on my Front End apps:

Move First - Will move to first 500 records
Move Previous - Will move to previous 500 records
Move Next - Will move to next 500 records
Move last - Will move to last 500 records

How to pass a query like this when one of the buttons are clicked?

Thank you!


-------------------------------------------------------------------------------------------------------
Learning MS SQL Server 2008

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-01-01 : 23:46:17
apply pagination on the page. use logic based on ROW_NUMBER function

http://www.codeproject.com/Articles/12338/Using-ROW_NUMBER-to-paginate-your-data-with-SQL-Se

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

adbasanta
Posting Yak Master

120 Posts

Posted - 2013-01-03 : 00:25:56
Thank you visakh16!

The link is very helpful.Ill post the query soon and post here back the result!


-------------------------------------------------------------------------------------------------------
Learning MS SQL Server 2008
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-01-03 : 01:13:25
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -