Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open tables

Status
Not open for further replies.

AdamVerellen

IS-IT--Management
Sep 20, 2002
39
CA
I have an application that needs to open a table that could be open by another application(which may hold it exclusively). How would I got about finding out if its in use? I tried an error utility type workaround by retrying unitl its released. Maybe there is a better way.

I found out the hard way used() doesn't work.

Adam
 
temp = fopen('myfile.dbf')
if temp < 1
file already in use
else
fclose(temp)
endif Attitude is Everything
 
AdamVerellen

Just trap the error:
Code:
ONERROR do myOpenTableerror

use myOtherTable.dbf shared && This might cause an error

PROCEDURE myOpenTableError
messagebox(&quot;Table is used my another user...Come back later.&quot;)
ENDPROC
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top