tags:

views:

33

answers:

1

My .net app uses an MDB file as a database (JET 4.0). From this app I need to make a BACKUP of the current database. The backup is performed making a ZIP file with the Access file. My function is throwing an error because the Access file is in use (by my own app).

I tried to close the connection just before compressing the file but that is not working.

Any idea how to "release" the .mdb file?

A: 

Does your app have some kind of database variable still open to the Access MDB file?

Added

To follow up on Jeff O's commment. Running Windows Explorer on the folder in which the Access database file runs will usually, unless opened in exclusive modem, the presence of the Jet 4.0 LDB or Microsoft Access Record Locking Information file. This can be a valuable clue in determining if your app still has the file open.

Tony Toews
I have a singleton with just one OleDB connection... and I CLOSE it, DISPOSE it... and then set it to NULL (well "Nothing" as I'm using VB.NET). But it seems to not release it...
Romias
Are you working in Debug mode in Visual Studio or is this also happening when the app is installed? There may be a conflict if you've listed the mdb file as a database connection.
Jeff O
I'm working in Debug mode in VS... I should try running the app as a standalone exe. But I don't use any wizard for the connection. BTW, the LDB file is present in the folder.
Romias
Is the LDB file presnt when you're not in VS? When does it appear? Before you run your code that creates the connection or right after it?
Tony Toews