So I am trying to implement an archive system of sorts for my (SQLite) DB app. I wrote a function to attach a separate (archive) DB and
sync the columns with main DB. If archive DB file does not exist, create file with _SQLiteOpen then close the file (and thus connection) with SQLite_Close.
This works as intended, however, after the create operation, all subsequent _SQLite_* functions returned a "Library misuse error".
After a little digging I found the problem in the _SQLite_Close function: it clears the "last opened database" handle even when there still is a live
DB conn