Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacement for USE/SELE table with IF...ELSE...ENDIF
Message
De
03/10/2007 13:54:09
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
03/10/2007 11:20:37
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01257862
Message ID:
01258293
Vues:
13
>Hey Jay
>
>I just saw something related in a program I inherited. I think the trick you're looking for is a replacement for CLOSING a file, not opening it.
>
>USE IN (SELECT('Schedule'))
>
>will close schedule if it's open and basically do nothing if it is not open.

That's because you told it to open nothing in the SELECT('Schedule') workarea. You could likewise

USE AnyOtherTable IN (SELECT('Schedule'))

and it would open AnyOtherTable in the workarea SELECT('Schedule') (which would be the first unused workarea if Schedule is not used). Since nothing is stopping us from opening the same table where it was already open...

USE schedule IN (SELECT('Schedule'))

would open Schedule in the workarea SELECT('Schedule').

So it closes and it can also open - that's the dual nature of the USE command, available since dBaseII, IIRC.

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