>>Any ideas how to determine is a database in use is opened shared or exclusively?
>
>Cannot remind some direct way, but you could use DBSETPROP() trying to make some dummy change (e.g. change comment to some field). If DBC opened exclusively you will succeed, and set lExclusive=.t., if not you should be stopped by some error code. Trapping this error, you resolve the problem (lExclusive=.f.).
You could run a test procedure something like
******************************
proc test_busy
parameters dbfname
if used(dbfname)
sele (dbfname)
use
endif
store on('error') to last_proc
*assuming no other errors occur the only error will be if the file is busy
on error return
use (dbfname) exclu
on error &last_proc
store not used(dbfname) to is_open
return(is_open)
****************************
? TEST_BUSY('TESTDBF')
RETURNS .F. IF TESTDBF.DBF IS NOT IN USE, .T. OTHERWISE
Hope this helps
Larry