Link to home
Start Free TrialLog in
Avatar of TEALTEAL
TEALTEAL

asked on

Compact Repair Database (Close Database)

I have the code to compact and repair a database. But I receive the error 3356 the database is open.. What is the best way to close the database, if it is open. I have tried db.Close but it must be open somewhere else in the project.  Any suggestions?
ASKER CERTIFIED SOLUTION
Avatar of danlevans
danlevans

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DaveWalton
DaveWalton

You can try to ensure that all active recordsets are closed and set to Nothing, then set db=Nothing before trying your repair.