Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create and Updatable Cursor
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00082148
Message ID:
00082449
Vues:
36
>>It will produce error if cursor doesn't exist on your harddrive (but dbf()
>>will report that the file does exist.) I spent some time tried to convince
>>VFP to create cursor on harddrive (Force clause in SQL, selecting .t. as
>>Dummy) but VFP doesn't want to waste my harddrive ;)
>
>Vladimir, I've not had a problem with this.
>
>USE dbf('tmp') again in 0 alias MyCursor
>
>works fine, even when file('tmp.dbf') is .F. - no record on the hard disk. I use this technique regularly, and haven't had any trouble, whether or not the file is written to disk.

Barbara, I recently posted about a problem I had with this too, after using this method for a long while without trouble -- not an error, exactly, but the USE AGAIN pulled in the original table (which was huge, and a big surprise (s)), instead of a small subset in "tmp". Now I put NOFILTER whenever in doubt on "tmp", this solves any potential problem (this is the vfp5 equivalent of WHERE .T., I believe)...I don't care in the least whether there's a file on disk or not, I just need the correct new cursor after USE AGAIN...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform