can't delete db until closing excel

Nov 21, 2011 at 9:53 AM


I am successfully running SQLite3Close after creating a new db and inserting tables and values. However, I cannot seem to then delete the db file unless I close Excel. I get the error: "The action can't be completed because the file is open in Excel".

Can anyone help?


Nov 21, 2011 at 10:09 AM
Edited Nov 21, 2011 at 12:57 PM


Many of the example macros (TestXXX) in the Sqlite3Demo module create a file, execute some statements and then delete the file again. So you could start by checking those macros and confirming the expected or problematic behaviour there.

Perhaps you have some statements that are not finalized (with SQLite3Finalize) before you call SQLite3Close. Every call to SQLite3PrepareV2 must have a matching SQLite3Finalize - you can't re-use a statement handle variable and then finalize only once.