Re: Rollback through ODBC?

From: Bryan <feng_at_everyware.com>
Date: 1996/03/27
Message-ID: <feng-2703960958050001_at_feng.everyware.com>#1/1


> aradford_at_interserv.com (Andrew Radford) wrote:
>
> >We are writing a Visual Basic application that does updates against an
 Oracle
> >database. The inserts are done using SQLPassthrough. The problem is
 that if we
> >send a rollback command, it doesn't. We have also tried using the ODBC API
> >calls and the same thing happens.
 

> >My theory is that Oracle is treating each statement that we send as a
 separate
> >connection so the rollback is not on the same connection as the update. Any
> >suggestions?
 

> >Andrew Radford
>

That's not Oracle's fault. By default, the ODBC driver uses auto-commit mode, which means that each statement is committed immediately after it is executed. If you want to use manual-commit mode, you have to call

   SQLSetConnectOption(connectionHandle, SQL_AUTOCOMMIT, 0) right after you have the connectionHandle.

Hope this help,

Bryan Received on Wed Mar 27 1996 - 00:00:00 CET

Original text of this message