How to close JET DB Connection in order to make a copy of MDB file?
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 th开发者_如何学编程rowing 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?
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.
精彩评论