V
VMI
How can I get the bottom N records from an Access table and store them in my
DataTable?
For example, in my Access table with 2000 records, if I want to display
records 151-200 (with ID as PK), my query
would be:
"select top 50 * from audit where ID > 150 order by ID asc"
Since ID is type AutoNumber, I'll see records 151-200. But once I'm
displaying them, how can I go back to seeing 101-150? I tried:
"select top 50 * from audit where ID <= 150 order by ID desc" and it'll show
me the correct data, but in the wrong order (from 150-101).
Thanks.
DataTable?
For example, in my Access table with 2000 records, if I want to display
records 151-200 (with ID as PK), my query
would be:
"select top 50 * from audit where ID > 150 order by ID asc"
Since ID is type AutoNumber, I'll see records 151-200. But once I'm
displaying them, how can I go back to seeing 101-150? I tried:
"select top 50 * from audit where ID <= 150 order by ID desc" and it'll show
me the correct data, but in the wrong order (from 150-101).
Thanks.