Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for a table being in use
Message
From
23/07/2003 14:58:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
23/07/2003 14:21:13
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00812873
Message ID:
00812888
Views:
13
You can simply:
USE employee IN 0 AGAIN
and avoid the error message.

Or, intercept the error:
local llError
on error llError = .T.
use employee in 0
on error
if llError
  * There was a problem
endif
>Using VFP8, is there a way to tell if a table is in use if that table was opened with a different alias?
>
>For example:
>**************************
>USE employee IN 0 ALIAS emp &&This is OK.
>
>***However, later on in the application...
>IF !USED("employee") &&This will return TRUE.
> USE employee IN 0 &&This would result in a File In Use error.
>ENDIF
>SELECT employee &&This would also error.
>**************************
>
>I know this isn't the best practice but how could I tell if employee is already in use in the current data session?
>
>Thanks,
>
>Jerry
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform