From: bill l. <cbi...@gm...> - 2008-12-05 03:00:34
|
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. 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. -- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 唐詩228 王維 雜詩 君自故鄉來 應知故鄉事 來日綺窗前 寒梅著花未 |