bikulov
asked on
Open MDB file on write protected disk
How can I work with an existing MDB file by using DAO functions on the write protected disk? I need just to read data from this file. The problem is related to the lock file which is always created on opening.
ASKER
I open MDB file as read only. And I get LDB file 64 bytes long created in the same folder. MDB file was created in Microsoft Access. Marking MDB file as read only does not bring any difference. I can't get rid of the LDB file.
Search the PAQ on this. There is a *simple* solution. The above steps are part of the solve. Lemme check my Q history ...
M
M
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. In fact it was even more easy in my case. I am using CDaoDatabase class. The following 'Open' options solved the problem:
Open("database.mdb", TRUE, TRUE, _T(""));
Database file does not even require read only flag. The key point was in "exclusive mode".
Open("database.mdb", TRUE, TRUE, _T(""));
Database file does not even require read only flag. The key point was in "exclusive mode".
Yep. But the R/O flag is useful in that it helps the JET engine decide that it shouldn't *TRY*. Be sure to set it when you make your CD's.
M
M
This has been answered before and does work.
M