|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem in limit a query in MS Access for paging
I have to display a result of a MS Access Query in a web application (in ASP language) in many pages, but I cannot use the feature LIMIT X,Y (which works on MySQL Databases).
I don't want to load all recordset and use rs.movenext method to get what I need. What can I do ? Thanks Fly |
|
#2
|
||||
|
||||
|
what you can do is get N rows beyond a certain point
you said that you are used to LIMIT X,Y when you did it that way, X was the number of rows to "skip over" and both values X and Y were passed to the query if you do it my way, you pass in the number N (same as your number Y), but instead of a count of rows to skip over, you pass in the ID of the row that you want the next N rows after then instead of SELECT... LIMIT X,Y you would say SELECT TOP N ... WHERE ID > IDvalue |
|
#3
|
|||
|
|||
|
ID field?
What does ID refer to? If you are refering to a feild that contains the number of the record, wouldn't you have a problem every time you deleted a record. You also wouldn't be able to use "SORT BY". Could you clarify this for me?
Thanks, Warren |
|
#4
|
||||
|
||||
|
i am referring to the primary key column(s) of the table
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Problem in limit a query in MS Access for paging |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|