• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 130
  • Last Modified:

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?
1 Solution
You must make sure ALL references to the database are closed. Including any internal defined databases, and Data Controls that have that database. I have seperatly running application that does these functions, you exit the main app and run the utility to do such functions.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now