Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking open table
Message
From
02/11/2007 15:21:45
 
 
To
02/11/2007 13:55:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01266141
Message ID:
01266186
Views:
10
This message has been marked as a message which has helped to the initial question of the thread.
>>I have the code below:
>>
>> close data
>> do backup.prg
>>
>>But suppose that my table is still open in a network
>>I don't remember which is the command to check if table is in use
>
>You can try to get an exclusive hold on the data like so:
>
>ErrCode = 0
>ON ERROR ERRCODE = 1
>OPEN DATA <your dbc name here> EXCLUSIVE
>if ERRCODE=1
> =MessageBox("File access is denied.")
>else
> close data
> do backup.prg
>endif
>
>
>Yelena

Since Moises uses VFP9, it's even easier
Try
  OPEN DATA <your dbc name here> EXCLUSIVE
  close data
  do backup.prg
Catch
 =MessageBox("File access is denied.")
Endtry
Previous
Reply
Map
View

Click here to load this message in the networking platform