Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tip o' the Day: ALTER TABLE on a Cursor
Message
De
16/02/2001 12:41:45
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
16/02/2001 12:25:48
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00476591
Message ID:
00476712
Vues:
29
>>*not only does it change the record in temp2 but it changes the record in out
>>
>>what if you don't want the changes to reflect in the out table, you only want to modify the cursor. do you have to use the create cursor statement.
>
>That means not only that "use again" on a filtered cursor gives you a read/write cursor which is a filter on the original table, but that it actually behaves as an updateable view... which would be a nice shortcut, if we could rely on it. Since Fox decides when it will be a filtered cursor (unless we put NoFilter in select, we never know if it will be filtered or not), we can't.

OK, I've done some testing on this. The reason it changes the record in the original table is that on a filtered cursor dbf() returns the original table's filename. Your Use Again does not use your cursor, but it uses the table. So if you want to use this great tipODday, include NoFilter in your initial SQL Select, else you may end up messing the original table.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform