Hey All,
How do you do paging with Fox Data? Paging, or block cursors, or whatever you want to call them is getting record 1-10, 11-20, 21-30, ect. like a web search engine would list its results.
I tried something like:
SELECT TOP 10 field FROM cursor ORDER BY 1 ;
WHERE field NOT IN (SELECT TOP 30 field FROM cursor ORDER BY 1)
So that would get top 10 results that aren't in the top 30 results, resulting in records 31-40... but I don't think VFP likes that. I'm trying to get it to one SQL Select statement, cause I'm using the OLE-DB Providor to get at the data. I know, I coudl use Stored Procedures, but currently the tables are free, and it would be nice to not change that.
I figured that the next best thing woudl be to get the TOP 10*page and just ignore what I don't need. So in order to display the first 10 records of a 30,000 record table, I would do a TOP 10. To get 11-20 I would just do a TOP 20 and ignore the first 10 on the client side. That would probably cut down on the data coming down the pike.