Delphi 6 / Zeos / SQlite

I am writing a program that uses master / detail I am new to Zeos and SQlite I already have convection, two tables, etc. I have an auto-increment primary key field on the main table that I want to update. What should I do to get the value of the primary key field automatically (and the record pointer stays in the record I just created) so that the value can be used for the detail table.

I am getting the following error:

Project Kaizen_2009.exe raised the EZSQLException class with the message "SQL error: SQL logic error or missing database." The process has been stopped. Use Step or Run to continue.

Thanks in advance

Alejandro Jourdan

+1


a source to share


1 answer


The easiest way is to use SQL statement -> SELECT LAST_INSERT_ROWID ().



Also, there is a TZSequence that should do the same - but I can't tell you for sure if it supports SQLite. Check the demo folder on your Zeos Lib installation. In particular, the ZSimple folder.

+1


a source







All Articles