I've searched high and low for an answer so I'm hoping someone can help me out and I hope I explain what is happening ok. I have a number of people testing an application and one of them in particular is running into this error repeatedly. The error does not happen on my machine or almost any other. I know it is in relation to database usage but what I can't figure out is why the user only gets the error after the database has been called x number of times (and closed each time its done being used) as opposed to why the program doesn't crash the first time the database file is accessed.

The database is in MS Access and here's some pertinent info from the code - and the error is not subject to any particular database call...it just seems that after so many hits to the database its had enough and it crashes.

First, the error

System.Runtime.InteropServices.COMException (0x800A0BEA): Could not lock file.
at dao.DBEngineClass.OpenDatabase(String Name, Object Options, Object ReadOnly, Object Connect)

Second, a typical database call

sFileLoaded = My.Application.Info.DirectoryPath & "\file.dat" (database file was renamed from .mdb to .dat outside of the application)db = DAODBEngine_definst.OpenDatabase(sFileLoaded)

and in a separate module the following is declared

Friend DAODBEngine_definst As New dao.DBEngine

Third, other info

- the database is closed each and every time its used with db.close
- immediately after it is closed I have
System.Runtime.InteropServices.Marshal.ReleaseComObject(db)

Like I said, why would the code work on almost all other machines (he's got a newer machine too and has tried both XP and Vista machines) and if there is something about his system why does is successfully call and use the database for awhile but then crashes out seemingly after a certain number of uses of the database file? I know it is not a specific call to the database because the area the application typically crashes for him at can be bypassed by changing some of the options available to the user - when he cuts back on the options used the program simply crashes at a later point in the process.

Thank you to anyone with an idea or two to try out here.