Page 1 of 1

SQLite Detach database error with TZConnection.ExecuteDirect

Posted: 16.04.2020, 17:44
by lfcap
Hello and thank you to the ZeosLib team for your good work.

I use Delphi XE5.
I just migrated from ZeosDbo 7.0.6-stable to 7.2.6-stable.
My program uses SQlite3 and attaches and detaches the bases with:
TZConnection.ExecuteDirect ('Attach database "myBasefile.db3" as XXX ’)
TZConnection.ExecuteDirect ('Detach database XXX')

This has been working well for several years with ZeosDb 7.0 but with 7.2 I have the SQLITE_ERROR error when the line TZConnection.ExecuteDirect ('Detach database XXX') is executed.
Do you have an idea to solve this problem?

I noticed in ZeosDbo sources that in V7.2 it was the sqlite3_step command while in V7.0 it was sqlite3_exec.
sqlite3_exec is used in TZSQLiteBaseDriver.Execute but this function is not used afterwards and is not accessible from TZConnection now.

Thanks for your help.