Problem with ODBC + Informix 11. Exceptions takes 2 minutes paused. lazarus / 16-Databases ---------------------------------------------------------------------- derles · 2013-07-09 12:29 Hello. I have Lazarus 1.0.10 + FPC 2.6.2 on win32. Also, Informix 11 Developer. Database: * Base Table: * Places     . ID int   (PK)     . sDesc char(80) Controls: * TODBCConnection    . Name: Conn1    . FileDSC: c:\App\Inf01.dsn    . User & Password setted ok.    . Transaction: Trans1 * TSQLTransaction    . Name: Trans1    . Database: Conn1 * TSQLScript (to insert some new registers)    . Name: sqlSC    . Database: Conn1    . Transaction: Trans1    . Script: My insert sentence I have a function with this code section to execute my insert sentence: try     Trans1.StartTransaction;     sqlSC.Execute;     Trans1.Commit;     ShowMessage('Inserted OK'); except     on E:Exception do     begin         Trans1.Rollback;         ShowMessage('Error:'#13#10#10+E.Message); end; My insert sentence is very simple, like this: *  INSERT INTO Places (ID, sDesc) values (3,'Place 1'); Ok. When I insert a new row whithout a problem (whithout syntax errors, with no PK conflicts, etc, it work just fine. But if I make a syntax error, or when y try to insert a duplicated ID, the program freezes for 2 minutes waiting for the exception. In 2 minutes an EODBCException is thrown. Also, sometimes I make an INSERT with ID conflict just to try, and no exception is thrown as if the sentence INSERT would work ok. But actually no insert occurs, of course. Any clue ?? ---------------------------------------------------------------------- BigChimp · 2013-07-09 12:39 (Note: have never used Informix) Why use sqlscript? You could use http://www.freepascal.org/docs- html/fcl/sqldb/tsqlconnection.executedirect.html or an sqlquery, setting the .SQL.Text property and running .Execute. SQLScript is meant for running batched/multiple statements from e.g. a file. I don't know if you're using it correctly here, you could look it up in the sqldb documentation. Perhaps there is some sort of timeout that needs to be configured server side or on the ODBC connector? ---------------------------------------------------------------------- derles · 2013-07-09 14:40 Thanks. I tried with ODBCConnection.ExecuteDirect, with the same result. Anyway, is a better choice that I didn't know. I'm new in Lazarus and ODBC. I always previously worked with Delphi and ADO. As you said, perhaps there is some sort of timeout server side or on the ODBC connector. On Informix server, I tried some on the onconfig file, but nothing went better. Sadly I don't have many documentation about it. On ODBC connectos I can't find any property or parameter about timeouts. I'll keep looking.