From: Alexander P. <ale...@re...> - 2008-12-05 13:22:24
|
bill lam wrote: > On Fri, 05 Dec 2008, Helen Borrie wrote: > >> No Alexander, I sent Gabriel here because this is an ODBC-specific >> question: someone needs to tell him how the ODBC driver implements >> SET TRANSACTION (gets handle, initialises handle) so that he can use >> it in his program. The docs refer to "declaring" a transaction >> (which is not in SQL) but they don't say what you have to do. >> Well, ok. I have thought, that it is not a question for odbc-*devel.* > In ODBC, new connection handle allocated is started in autocommit > mode. To start a transaction it needs to call odbc api to change > attributes for that handle to autocommit off. Both commit and rollback > are implemented with another api sqlendtran. The connection handle > will not be set to 'autocommit on' with this sqlendtran. > > Odbc documentation recommends its own api for transaction rather than > using database specific sql statement such as 'SET TRANSACTION'. > > OP said he used clarion which is another layer between his program and > odbc. The issue may also come from clarion and I'm not sure why using > sql statement for transaction under odbc should work for firebird or > other databases. > > The transactions start automatically in autocommit mode in Firebird ODBC driver. (BEGIN TRANSANCTION is not required) You can manage transactions through SQL using COMMIT and ROLLBACK statements. Regards, Alexander -- Alexander Potapchenko http://www.red-soft.biz Senior developer |