deadlocks - firebird lazarus / 16-Databases ---------------------------------------------------------------------- 3rdshiftcoder · 2015-09-20 02:46 Hi- When you using data aware components, how do you handle deadlocks so they don't crash your application? How do you tell your application to rollback? How would you handle the deadlock exception?  It would be like a run-time error...right? I have been fooling with fb-isql and setting the different isolation levels and parameters to see how transactions work. thanks for any ide or coding tip regarding this! THANKS, jim ---------------------------------------------------------------------- 3rdshiftcoder · 2015-09-20 03:05 Hi- For  a roll back it might be something like this i think. Does this look like the right way? -- Thx, jim begin    try       db stuff    except       on dberror do       begin          a rollback statement;       end;    end; ---------------------------------------------------------------------- 3rdshiftcoder · 2015-09-20 04:29 Hi- I took off the auto commit and raised this exception EZSQLException. It is a deadlock. Now I have to figure out how to rollback when I get this exception. I just made a project tonight to test out the locking. I have been working in fb-isql before tonight. thanks, jim ---------------------------------------------------------------------- 3rdshiftcoder · 2015-09-20 06:12 Hi- I found this link: http://wiki.lazarus.freepascal.org/SQLdb_Tutorial2# SQLite.2C_PostgreSQL.2C_other_databases I will have to do some reading tomorrow. I need to figure out how this code works if I am editing in a grid. I am too tired to read about it at the moment. thanks to whomever posted this tutorial. I think it will be exactly what I need. jim ---------------------------------------------------------------------- 3rdshiftcoder · 2015-09-20 18:16 HI- It turns out because I am using Zeos that this is the  best link I found. This should take care of deadlocks I think. http://forum.lazarus.freepascal.org/index.php?topic=12299.0 Thanks to the cool people who posted it! Have a great rest of the weekend, jim