Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use file exclusive question
Message
From
22/07/1999 12:20:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
22/07/1999 12:04:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00244710
Message ID:
00244823
Views:
14
>could'nt you use
>
>if used('filename')&& returns .t. if open
> select filename
> use filename exclusive
>else
> use filename exclusive
>endif
>
>hope this helps
>James
Unfortunately no. used() gets either Alias or workarea as parameter. Tablename might be different. But yes if you want to loop through all aliases in use and check their dbf().
There is another interesting thing though :
use mytable shared
use mytable in 0 again alias myNew Exclusive

doesn't give any error and opens the myTable in new workarea as SHARED.
This would mean looping through aliases you could hit the one opened "again" first and you shouldn't cut your check there.
I think there is no cheap way of determining if a table is opened somewhere already by you or by someone else.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform