Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is table open by another program?
Message
From
04/04/2004 19:48:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00892131
Message ID:
00892141
Views:
23
>I just can't remember how to do this: How can I tell if a free table is in use (it's already open) by another program?
>
>Mel Cummings

I think I would just use error handling. Something like this:
local llError, lcError
llError = .F.
lcError = on("error")
on error llError = .T.
use MyTable exclusive
if llError
  MessageBox("Could not open the table MYTABLE, for some reason.")
endif
on error &lcError && restore previous ON ERROR
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
Next
Reply
Map
View

Click here to load this message in the networking platform