milind_kadam
February 27th, 2008, 03:09 PM
Hi There,
I have developed the ODBC app which can work with Oracle as well as MSSQL server databases. I need to use transactions at some level. By
setting AUTOCOMMIT OFF and using SET TRANSACTION and BEGIN WORK, COMMIT WORK through SQLExecDirect calls everything works fine with Oracle. But with MSSQL server does not. Do I need to code something special for MSSQL? Does anyone has example on how to implement transactions with MSSQL server using ODBC?
I tried reading lots of documents on Microsoft site but nothing specifically says how to do this. One way the doc says is using SQLSetConnectAttr with SQL_ATTR_TXN_ISOLATION but does not specify how to.
Any help with appreciated. Thanks in advance.
Milind
I have developed the ODBC app which can work with Oracle as well as MSSQL server databases. I need to use transactions at some level. By
setting AUTOCOMMIT OFF and using SET TRANSACTION and BEGIN WORK, COMMIT WORK through SQLExecDirect calls everything works fine with Oracle. But with MSSQL server does not. Do I need to code something special for MSSQL? Does anyone has example on how to implement transactions with MSSQL server using ODBC?
I tried reading lots of documents on Microsoft site but nothing specifically says how to do this. One way the doc says is using SQLSetConnectAttr with SQL_ATTR_TXN_ISOLATION but does not specify how to.
Any help with appreciated. Thanks in advance.
Milind