Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USED() with non .dbf extension
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00276954
Message ID:
00277044
Views:
25
>>>>Well... if you opened the file in the default data session, and run the above code in the private data session of the form, they should all return .f.
>>>>
>>>>That is the point of a private data session.
>>>>
>>>>BOb
>>>
>>>Well, if you want use common sense on me. < g >
>>>
>>>So I want to open the table exclusively. How do I tell if it's in use?
>>
>>Roi,
>>
>>If you track the data sessions in use, you can find what files are open in each with AUSED().
>
>Hi George,
>
>Right, I knew that. The hurricane must be impairing my electro-magnetic brain functions today.
>
>Actually the fopen gig seems to be working and is fairly simple. Thanks.

cOldError = ON('ERROR')
lInUse = .f.
ON ERROR lInUse = .t.
USE mytable EXCLUSIVE
ON ERROR &cOldError
IF lInuse
* file is in use else where
ELSE
* OK, you've got it!
ENDIF
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform