SQLite3 release 3.25 and higher allows me to "ALTER TABLE myTable RENAME COLUMN oldColName TO newColName". But I get an error "near RENAME" when I execute this in my Delphi code, but it works running the new sqlite3.dll from the command line or with another utility.

This works:

HerdConnection.ExecSQL('ALTER TABLE myTable RENAME TO NewNameTable');

This fails:

HerdConnection.ExecSQL('ALTER TABLE myTable RENAME COLUMN oldcolName TO NewColName');

Since i installed the new sqlite3.dll driver, the column re-name does work, but NOT in my Delphi code (Delphi 10.2 Update 2)

I suspect the included sqlite3 driver with FireDac is not up to date, but have switched to the newest sqlite3.dll everywhere on the computer i can find.

1 Answers

Branko On

You're probably using FireDAC with default SQLite static linking. Static linking based on SQLite binaries v 3.9.2. If you want to use the latest SQLite, you need to switch to dynamic linking. The exact instructions are on the link Connect to SQLite database (FireDAC)