Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incrementally Pulling Records with SQL Pass-Through
Message
 
 
À
28/04/2001 11:45:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00501241
Message ID:
00501281
Vues:
18
Hi!

Use a query like
select top 10 ... from ... Where ... AND ordernum > 11 order by ordernum

ordernum is a key field or order field or some expression. Use it to separate records. Last value for WHERE condition you can get from the last record of the previous query result. Because records are ordered, you should get correct results if "ordernum" is unique in the query. At the client side, however, you require to combine these partial record sets to a single one. Its hard also to organize updates in such case.

You can also try to use views, but I'm not sure it can help (they have some cursor properties).

>I am using SQL Pass-Through to pull a cursor from a remote database. The cursor is usually rather large and takes more time than what is desired to pull all the generated records down from the server. What would be the best to incrementally pull the records, i.e. records 1 through 10, then go back and get 11 through 20, and so on to the end? TIA.
>
>Bryan
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform