| DB Access Class Library for COBOL V1.0 API Reference - Microsoft(R) Windows(R) - - Microsoft(R) Windows NT(R) - - Microsoft(R) Windows(R) 2000 - |
Contents
Index
![]()
|
Chapter 6 DB Access Library API Reference
6.2 Methods
Begins a transaction directed at the database associated with an object of the FJDB-DATABASE class.
INVOKE DATABASE-A "BEGIN-TRAN" RETURNING RET-CODE.
DATABASE-A [attribute:OBJECT REFERENCE FJDB-DATABASE]
Specifies an object of the FJDB-DATABASE class.
RET-CODE [attribute:S9(9) COMP-5]
Returns a value of 0 if the method ends normally; otherwise, returns an error code.
With the DB access class library, transactions would normally be completed automatically when an UPDATE-RECORD or DELETE-RECORD method and an EXECUTE-SQL method are issued. The mode of operation in which a transaction is completed on each run of an update method is called automatic transaction mode.
On the other hand, the mode of operation in which the initiation, termination, and cancellation of a transaction is user-controlled is manual transaction mode. When a BEGIN-TRAN method is issued, the transaction enters manual transaction mode.
In manual transaction mode, the transaction would last even when an UPDATE-RECORD or DELETE-RECORD method and an EXECUTE-SQL method are issued. In this mode, use a COMMIT-TRAN or ROLLBACK-TRAN method to let the transaction be completed.
Contents
Index
![]()
|