Using Transactions; Nested Transactions - Omron CX-SUPERVISOR - V2.0 User Manual

Table of Contents

Advertisement

OMRON
Schema Views
Note:

Using Transactions

Modifications of data in the database i.e. adding, modifying and deleting records, can be grouped so
that all modifications take place at the same time.
Transaction. A Transaction includes any modifications to data in a connection, regardless of the
Recordset. A transaction is started by calling DBExecute with the 'BeginTrans' command. From that
point, any request to add, modify or delete records are stored instead of being immediately processed.
The Transaction is completed either by calling DBExecute with the 'CommitTrans' command, which
processes all the stored requests in one go, or by calling DBExecute with the 'RollbackTrans'
command, which discards all the stored requests leaving the database as it was when the Transaction
started.

Nested Transactions

Transactions may be nested, that is a new transaction may be started before the preceding transaction
has been completed. In this case, any 'CommitTrans' or 'RollbackTrans' commands relate to the most
recently started transaction, and any further 'CommitTrans or 'RollbackTrans' commands relate to the
transaction begun before it.
Note:
Note:
Release 2.0
The actual schemas are defined by the OLE DB specification and Providers are not
required to support all of the OLE DB standard schema queries. Specifically, only
'Schema Tables', 'Schema Columns', and 'Schema Provider Types' are required
by the OLE DB specification. However, the provider is not required to support the
Criteria constraints listed above for those schema queries.
Care should be taken to ensure that each 'BeginTrans' is matched with a
'CommitTrans' or 'RollbackTrans' to ensure that your work is saved or discarded as
required. If there are any pending transactions when a connection is closed, the
user will be prompted to either commit or rollback these outstanding transactions.
A DBExecute command 'TransCount' is available which returns the number of
pending transactions.
Not all Providers support use of Transactions.
CHAPTER 12 – Databases
VIEW_NAME
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
This group of modifications is called a
Page 211

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents