Closing a database
Posted on 1999-07-23
I use VB5 with SP3.
Before backing up data, I close my database (db.Close). I do not use a network. However I often get an error 70 (permission denied). If I quit the application completely, and then restart the application, the backup works fine.
I have run the application with all error traps disabled. When the error occurs, I enter a further line of code (db.Close). This closes the database and the backup works correctly
How do I ensure that the database ALWAYS closes? I cannot close it twice as there will be an error if it has already been closed!