File could be opened or read-only mode. ObjectDBX requires full access to file.
Actually I check is file read-only (using vl-file-systime function and check file attributes). And if it does - I copy file to %temp% folder, proceed it and then erase it.
Also you can use vl-catch-* functions to catch any kind of errors.