Quote:
Originally posted by gleech
Dear All
Does anyone have some code that will allow me to do the following:
I have a SQL table that returns > 100 rows
I want to put these rows into a drop-down (combo box) - I CAN DO THIS
The problem I am having is that I only want to display x rows at a time
I am able to do SET @@ROWCOUNT in my Stored Procedure - that's not a problem, but how do I display the rest of the results - will this be done using SQL code, or can I do this using vbscript, do I need to use @@ROWCOUNT?
e.g. when the user first goes to the page they click the drop-down box and the first 30 rows are displayed, but how do I run the code to display the next 30 and then the next 30 etc....
Thanks for your help
Gill
|
I don't know if this applies to MS SQL, I work exclusively with Access databases... but in Access, the recordset object has a method called GetRows. Getrows has parameters one can pass to indicate the starting row, and the total number of rows to return into an array.
I use this for navigating tables all the time.
Maybe you already knew this and it won't work in your case, or maybe it's not something that can be done in MSSQL.
Either way, Good Luck.
Tim