Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is table already open under diff alias?
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01448039
Message ID:
01448224
Views:
33
>>
>>Local llMyTableOpened
>>
>>>llMyTableOpen=.F.
>>>Try
>>>	Use mytable Alias UsedJustToCheck  in 0 shared
>>>Catch
>>>	*---myalias is open now one way or another...
>>>	*---flag this so it doesn't get closed at end of routine
>>>	llMyTableOpen=.T.
>>>Finally
>>   use in select('UsedJustToCheck')
>
>I think what John was saying makes sense. It looks like my problem could be solved much simpler. I just need to open/use the table under some alias with the word AGAIN. And then close this temporary alias. This way, if the table is opened prior to this procedure it stays open; if it was not opened, it will be closed after. Do you see what I mean?

Yes, I think I see. Sure, we can open a table under a new alias with AGAIN clause (as long as it was not already opened exclusive before) and this way we don't have to worry if it was already opened or not since for our purpose we would be using a temp alias.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform