Oracle Objects for OLE
Release 9.2

Part Number A95895-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

AutoCommit Property

Applies To

OraDatabase

Description

Returns or sets the AutoCommit property of the OraDatabase object.

Usage

autocommit = OraDatabase.AutoCommit

OraDatabase.AutoCommit = [ True | False ]

Remarks

If AutoCommit is set to True, all the data operations that modify data in the database are automatically committed after the statement is executed.

If AutoCommit is set to False, you need to use the OraDatabase transaction methods (BeginTrans, CommitTrans, and Rollback) or SQL statements to control transactions.

The following example shows how to control transactions with SQL statements after setting the AutoCommit property to False.

Dim session As OraSession

Dim MyDb As OraDatabase

Set OraSession = CreateObject("OracleInProcServer.XOraSession")

Set MyDb = OraSession.OpenDatabase("ExampleDb", "scott/tiger", 0)

MyDb.AutoCommit = False

MyDb.ExecuteSQL ("update emp set sal = 100000

where ename = 'JOHN SMITH' ")

MyDb.ExecuteSQL ("commit")

Data Type

Boolean


 
Oracle
Copyright © 1994, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback