Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Paging VFP Data
Message
De
10/02/2002 10:23:22
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Paging VFP Data
Divers
Thread ID:
00618013
Message ID:
00618013
Vues:
149
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform