TRY open database <DatabaseName> exclusive CATCH to oerr if oerr.errorno = 1705 = messagebox("Someone is using the database", 48,"Error") else = messagebox(transform(oerr.message),48,"Error") endif FINALLY close databases ENDTRYor
m.errorStat = .f. on error m.errorStat = .t. open database <DataBaseName> exclusive * If database is in use there will be an error * and variable m.errorStat will have the .t. value if m.errorStat = .t. = messagebox("Error opening the database") else = messagebox("Database opened sucessfully") endifI can't help you in the subject of knowing who has open the DB.