Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Used File
Message
From
20/07/1999 04:35:08
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
19/07/1999 23:48:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00243420
Message ID:
00243465
Views:
23
>Dear all,
>
>Is there any other command for knowing that a table is being used by another user besides "USED" ?
>
>thank's
Knowing that is not easy. Even used() doesn't give enough info if it's used by you because it uses alias, not tablename. You might open tableA with alias myTable then used("tableA") returns .f. where used("myTable") returns .t.
It should be needed rarely to know, that FP didn't provide a command for it at all. Even select() returns the highest unused area but not lowest :) I wonder who needs the highest if we are using them starting from lowest (maybe just to check system capacity).
If what you want to do is to attempt exclusive usage then there are workarounds :
1) Try opening exclusive wrapped in an ON ERROR routine. But interestingly if already opened in shared mode by you in an area, you could reopen it in another area using AGAIN and EXCLUSIVE clauses. Then it's opened shared and doesn't give an error.
2) Try to open it lowlevel (fopen()). This is a safer way of knowing it. You cannot get a valid handle (cannot open) if it's in use by you or someone else in any mode.
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