.
Eloquence B.07.10 contact contact


DBBEGIN

 
.
  Designates the beginning of a sequence of database procedure calls regarded as a static or multiple database transaction (based on the mode) for the purposes of logging and recovery. The text parameter can be used to log user information to the log file. DBBEGIN is used in conjunction with DBEND to begin and end a static or multiple database transaction.

Static transactions are currently not supported with Eloquence and DBBEGIN has no effect. Eloquence relies on dynamic transactions internally. A future version of Eloquence may add support for static transactions for use with forward recovery or auditing purposes.

DBBEGIN(base|baseidlist,text,mode,status,textlen)
base
is the name of the array used as the base parameter when opening the database. The first element of the array must contain the base ID returned by DBOPEN. (Refer to DBOPEN for more information about the base ID.) Use base when calling DBBEGIN mode 1 (static transaction).

The base argument is ignored with Eloquence.

baseidlist
is the name of the integer array containing the base IDs of the databases which are involved in a multiple database transaction. Use baseidlist when calling DBBEGIN mode 3 or 4 (multiple database transaction). The layout of this array is shown here (each element is a halfword or two bytes):

Element Contents
1-2 The application program must set these two halfwords to binary 0s before calling DBBEGIN. After returning to the calling program, these two halfwords contain the transaction ID. This ID can be used in order to end the transaction by calling DBEND.
3 The number of base IDs involved in the multiple database transaction. This must be a number between 1 and 15, inclusive.
4-n Base IDs of the databases involved in the transaction. Base ID is the first halfword of the base parameter used to call database procedures.

The baselist argument is ignored with Eloquence.

text
is the name of an array up to 256 halfwords long that contains user ASCII or binary data to be written to the log file as part of the transaction log.

mode
is an integer indicating the transaction type:

  • Mode 1: Indicates a static transaction.
  • Mode 3: Indicates a multiple database transaction with one log record per database. If user logging is enabled for the databases, mode 3 generates multiple entries in the log file in order to mark multiple database transactions.
  • Mode 4: Indicates a multiple database transaction. If user logging is enabled for the databases, mode 4 generates one entry in the log file in order to mark multiple database transactions.

The mode parameter has no effect with Eloquence.

status
is the name of an array of 10 halfwords in which the database returns status information about the procedure. If the procedure executes successfully, the status array contents are:

Element Contents
1 If the procedure succeeds, the return status is 0. Otherwise it provides a status code to describe the failure.
2-4 Unchanged.
5-10 Information about the current procedure call and its results.

textlen
is an integer equal to the number of halfwords to be logged from the text parameter, or is a negative integer equal to the number of bytes. Length can be zero.


Notes:

  • Static transactions are not supported and DBBEGIN has no effect besides verifying the arguments.


 
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision: 2006-01-24  
  Copyright © 1995-2024 Marxmeier Software AG