Reputation: 63
I need to ZAP a table in order to refill it with fresh data. I set Exclusive ON, I USE the table EXCLUSIVE, and yet, when I try to ZAP the table I get the error message "File must be opened exclusively".
What am I doing wrong?
The table is not opened anywhere else, according to the Watch window Exclusive is really ON and the table IS opened exclusively, and I get the same result with DELETE ALL/PACK as with ZAP.
Thank you.
/bernard
Upvotes: 0
Views: 4655
Reputation: 48139
Bernard, not counter productive. Use Table EXCLUSIVE will ALWAYS override the EXCLUSIVE setting. So even if set exclusive off, a use table EXCLUSIVE will always work.
Now, the issue is that if some other user has the program and table open, it should FAIL OPENING the table exclusively to allow the pack to occur.
Upvotes: 1
Reputation: 823
Try to set exclusive mode before opening the file:
SET EXCLUSIVE ON
USE "D:\somefile.dbf"
ZAP "D:\somefile.dbf"
Upvotes: 0