Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incrementally Pulling Records with SQL Pass-Through
Message
De
01/05/2001 10:07:28
Phillip Perkins
Technology Consulting, Inc.
Louisville, Kentucky, États-Unis
 
 
À
01/05/2001 10:00:10
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:
00501930
Vues:
12
Most databases usu. require a unique identifier for the table (the primary key). You should get into the habit of using that instead of the RECNO(). If all you're wanting to do is peruse the data locally, then RECNO() should work fine on your client-side cursor. However, if you want to do it server-side, you should invest in a incremental field on the table (in essence, that would be your record number). The only drawback to that would be that if you deleted records, you would either have to live with that increment missing or repopulate that field with incremental data.

Phillip

>Thank you both for your suggestions. Is there any way to reference the RECNO() of records generated in a cursor, i.e. something like WHERE RECNO() >= 1 AND RECNO() < 11? By the way, the database that I am pulling from is DB2. Thanks.
>
>
>>Did you try a CURSORSETPROP("MaxRecords", 10, "tablename") or CURSORSETPROP("FetchSize", 10, "tablename")? The way I figure it, SQL creates a cursor on the server-side. FoxPro pulls all that data into one large local cursor, unless you specify otherwise. When you send updates, FP actually updates the server-side cursor which SQL, in turn, uses to update the data.
>>
>>Phillip
>>
>>>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
"D'OH!" --Homer Simpson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform