Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacement for USE/SELE table with IF...ELSE...ENDIF
Message
From
03/10/2007 18:40:47
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
03/10/2007 13:54:09
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01257862
Message ID:
01258373
Views:
16
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform