• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 363
  • Last Modified:

How to rollback transaction for MS-Access using SQL?

I am using ODBC to interface with MS-Access.  My application manage to execute the SQL rollback command but it does not rollback the transaction.

Wherelse, I manage to rollback transaction from ORACLE which is using native mode.

Could it be something that I have to set in ODBC setup?
0
cwchaw
Asked:
cwchaw
1 Solution
 
fasterCommented:
Does the ACCESS driver support roll back in the first place?
0
 
ylCommented:
In order to rollback a transaction you need the turn off the AutoCommit option for the connection you are using. You do this by the following Odbc API call:

SQLINTEGER iValue = SQL_AUTOCOMMIT_OFF;
SQLSetConnectAttr(hDbc, SQL_ATTR_AUTOCOMMIT, (void*) Value, NULL);
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now