From: b2j <b2...@gm...> - 2008-12-05 03:20:22
|
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 唐詩120 王維 過香積寺 不知香積寺 數里入雲峰 古木無人徑 深山何處鐘 泉聲咽危石 日色冷青松 薄暮空潭曲 安禪制毒龍 |