I'm using TSQLQuery and a SQLite 3 database.
Under macOS I keep getting the error that "
SQLite3Connection : database schema has changed." after I drop a temporary table (which is not used after that).
What is the correct way to handle this, or is this a bug?
Some more info:
macOS Catalina 10.15.2, Lazarus 2.1.0 r62379M FPC 3.3.1 x86_64-darwin-cocoa (beta).
I'm using the following to set the correct dylib (this used to be not needed, but with Catalina this seems required? Any advice on doing this better is very much appreciated).
SQLiteLibraryName:='/usr/lib/libsqlite3.dylib';
In code I set the SQL of a TSSQLQuery to drop the table. SQLTransaction is active.
DROP TABLE IF EXISTS MyTempTable;
And execute it with "
ExecSQL" followed by a "
SQLTransaction.Commit;".
I've tried starting a transaction (SQLTransaction.StartTransaction) and ending a transaction (SQLTransaction.EndTransaction), but that didn't work other.
Dropping the table works, but anything after that produces the "Data schema has changed" error.
Under Windows and Linux this does work just fine. Just under macOS this causes an error.
Could this be related to the library (dylib) or the fact that I'm using FPC 3.3.1 (SVN) ?
I'm not the most knowledgeable person when it comes to using SQLite, and couldn't find anything, concerning this issue, in the Wiki.