
MSG: Database already open when trying to compact???
A customer has a
Visual Basic Application that updates several Access tables
in one .mdb. In the application, they compact the database. When the
compact code is AT THE END of the application (after the udpates had been
made) - it tries to execute the first line of code (that basically says
compact x database and save it as y database) it would give an error: You
attempted to open a database that is already opened by findiv123 (which is
the PC that runs the application on). In processing, the database is opened
ONCE. But right before running the compact code, the database is CLOSED.
Since we couldn't get the compact to work at the end, we moved it to the
beginning. We still open the database ONCE and then close it, and then run
the compact code, and NOW THE COMPACT RUNS (as well as the rest of the
program).
Any reason why it would work this way???
Thanks, Krystal