CraigC, when you are using SQLite3 I would setup your main table and hardcode your SELECT, UPDATE, INSERT and DELETE in your FormCreate or FormShow. With your table having an AutoInc field that's internally updated, don't include your AutoInc field in your UPDATE or INSERT statements. You need the AutoInc field in your SELECT and DELETE statements. Also, you don't need fields included it they aren't required for a record to be UPDATED or INSERTED. With an AutoInc field you UPDATE fields and at the end of your UPDATE statement WHERE AUTOINC-FIELD=:OLD_AUTOINC-FIELD, not := but =:
The reason for hardcoding is I learned awhile back when I was first using SQLite3, I was putting the SQL Statement, UPDATE, INSERT and DELETE in the query component: SQL [TStringList], DeleteSQL [TStringList], InsertSQL [TStringList], and UpdateSQL [TStringList]. But I would forget to update these stringlists if I added a field as I was first programming the app.
Another issue when first designing your queries and your modifying a table, even just adding a field to the table up at the top of your unit in the interface under the type section, you will see all the fields in your table listed with their type: QryClientsCLIENTID: TAutoIncField; (your AutoInc field) QryClientsCOMPANY: TStringField; QryClientsADDRESS: TStringField; etc. Even though I have the SQL, INSERT, UPDATE, DELETE statements hardcoded, you can right-click your mouse on your query component and Edit Fields... at the top of the listing. There will be a listing of every field included in the query. Now if you modify with DBBrowser and modify your hardcoded SQL statements, that listing isn't updated. So, anytime you modify a table whether you remove a field or add a field, you need to check that listing because it's not updated if you just modify your coded statements. All your fields in the TYPE area at the top of your Unit should be in sync with your query statements.
Have fun programming...