Handling SQLite UNIQUE error lazarus / 16-Databases ---------------------------------------------------------------------- HatForCat · 2016-02-18 21:14 Could someone please give me a clue in how to handle a UNIQUE Field error with Zeos and SQLite. The Field is not a Primary Key, just a data Field that I do not want duplicated so I have defined just that field as UNIQUE in the database. Code: [Select]  if tblDogs.State in [dsInsert] then   try     tblDogs.Post;   except     // show message   end; SQLite throws an error as expected, but I can't seem to figure out a way to handle it. I have tried using Try-except with "Post," "BeforePost" and "OnPostError" and is still updates the database but without the offending UNIQUE Field data. I want to leave the Table in "Insert" mode and force the user back for another try.