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 13:54:09
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
03/10/2007 11:20:37
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01257862
Message ID:
01258293
Views:
15
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform