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 18:40:47
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
03/10/2007 13:54:09
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
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:
01258373
Vues:
17
Hi Dragan

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

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

I think I wasn't clear. I think Jay may have confused opening the table with the single line close a table technique.

There is no single line way to open a table, because there's no much value in that. If it's open already, leave it open. If not, open it and then select it. Saves time

IF NOT USED("table")
use table in 0
ENDIF
select table

On the other hand, there is a single line to close a table. While it's easy to...

USE IN TABLE

If the table has already been closed, that will cause an error. So the quick, error free way to close a table is....

USE IN (SELECT("TABLE"))

Which is what I think Jay was remembering seeing.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform