Hi
I am having problems with deleting using DBNavigator. My lack of experience with Lazarus is contributing to the difficulty.
I am trying to rewrite a customer contact application that was originally done in Delphi (Delphi 7 I think).
I have a form on which there is a DBGrid, DBNavigator, SQLite3Connection, SQLTransaction,SQLQuery and DataSource. The database is SQLite with a single table.
I need to be able to select a record in the grid and delete when necessary also to add new customers as required.
In testing this I found that I could delete and insert and post with no problems using the Navigator buttons but, if I insert a new record and then follow this with a delete I get an error message: -
"An error occurred while applying the updates in SQLite3Connection. No delete query specified and failed to generate one. No field for inclusion in where statement"
It shows this without fail every time I follow a new record insertion with a delete.
I think it needs some code in either SQLQuery.AfterDelete or AfterInsert or elsewhere
but I don't know where and I don't know what.
Since users cannot be relied upon not to do this I have to fix it.
I would be glad of some help please.
AJR