Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with writeable cursors
Message
De
17/01/2000 14:56:52
Walter Meester
HoogkarspelPays-Bas
 
 
À
17/01/2000 14:39:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00319138
Message ID:
00319149
Vues:
16
Bela,

Obviously you've created a fully optimized SQL query. VFP then decides rather than to create a readonly cursor, to set a filter to the original table. To avoid this situation, just add the NOFILTER clause to the SQL SELECT.

In this cases VFP alway creates a temporary cursor. And yes then it's save to use it again to make it writable, so it behaves just like an ordinary cursor.

Walter,

>
>I found the following syntax to make a cursor writeable:
>
>USE DBF("cMyCursor") IN 0 AGAIN ALIAS cAnotherCursor
>
>But if I use the following :
>
>select anyfield from MyTable into cursor cMyCursor
>
>then DBF() gives back the path of the original table, but I don't want to write into the original table.
>After some reasonong, I have tried using the following:
>
>select anyfield from MyTable into cursor cMyCursor nofilter
>
>then DBF() gives a really temporary filepath.
>
>According to the VFP documentation, neither of the previous syntax creates phisical files. But practically, the second syntax still produces one.
>
>Is it sure, that the second syntax always produces a temporary file, and thus, is safe to write into the cursor after making it writeable?
>
>P.S.: I know, that
>
>select anyfield, .t. from MyTable into cursor cMyCursor
>
>does the job, but I would like to understand the theoretical background.
>
>TIA
>
>bb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform