Enabling SQLite Foreign Keys without command

292 views Asked by At

Is there a way to enable the SQLite Foreign Keys with the TFDQuery component and without using a sql command?

I build a SQLite DB with foreign keys and it works, also without enabling that option. However, I might better use it.


LuMa

1

There are 1 answers

0
CL. On BEST ANSWER

It would be possible to enable foreign key enforcement by default with the SQLITE_DEFAULT_FOREIGN_KEYS compilation option, but this would require recompiling the database (driver).

Otherwise, you have no choice but to execute an SQL command.