Solved

How to rollback transaction for MS-Access using SQL?

Posted on 1998-01-21
2
358 Views
Last Modified: 2013-12-03
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
Comment
Question by:cwchaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Expert Comment

by:faster
ID: 1410247
Does the ACCESS driver support roll back in the first place?
0
 
LVL 1

Accepted Solution

by:
yl earned 200 total points
ID: 1410248
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question