B DBML Syntax

DBML Statements and Advanced Access

DBLOGON (user$, pass$)

The DBLOGON statement saves the authorization information which should be used subsequently when connecting a database serever.

DBOPEN (base$, pass$, status(*))

The DBOPEN statement opens the database for access and defines the type of access allowed (for example, read-only, exclusive, or shared).

The DBCLOSE statement closes the database and updates all information in the root file. The set parameter is ignored.

The DBGET statement is used to retrieve information from the database. If an IN DATA SET is active on the specified set, buf$ will be unpacked into the appropriate variables.

The DBUPDATE statement is used to modify values in an existing record in the database (search item values cannot be modified). If an IN DATA SET is active on the specified data set, buf$ will be updated with the current values of the appropriate variables before the operation.

The DBPUT statement is used to add new entries to sets of type detail or manual. If an IN DATA SET is active on the specified set, buf$ will be updated with the current values of the appropriate variables before the operation.

The DBDELETE statement is used to remove entries from sets of type detail or manual.

The DBFIND statement is used to find the head of a chain in a detail data set.

The DBINFO statement provides general information about the database.

The DBLOCK statement locks the entire database or sections of the database so modifications can be performed when the database is open in shared mode.

The DBUNLOCK statement unlocks a database or section of the database that was locked with a previous DBLOCK.

PREDICATE predicate$ FROM set1 [,item1 [,relop, value] ] [;set2 . . .[;setn] ]

The PREDICATE statement defines a section of the database to be locked with the DBLOCK statement.

DBBEGIN (comment$, mode, status(*))

The DBBEGIN statement begins a new (sub-) transaction. When this is the first transaction, it is called top level transaction. No modifications are permanently saved in the Eloquence A.06.00 data base until the top level transaction is committed. A subsequent DBBEGIN begins a new subtransaction, which can be controlled separately with the DBCOMMIT and DBROLLBACK statements.

DBCOMMIT (mode, status(*))

The DBCOMMIT statement commits a transaction. If this is a top level transaction, modifications are made permanently in the data base. If a subtransaction is committed, it becomes part of its parent transaction.

DBROLLBACK (id, mode, status(*))

The DBROLLBACK statement is used to undo a pending transaction. If this is a top level transaction, all pending modifications are reverted. If applied to a subtransaction all modifications including the enclosing DBBEGIN statement are reverted.

Msg$ = DBEXPLAIN$(n)
Msg$ = DBEXPLAIN$(status(*))

The DBEXPLAIN$ function translates the given status into a descriptive message.

DBASE IS base$

The DBASE IS statement is used to specify the database before any IN DATA SETs.

The IN DATA SET statement defines the automatic packing or unpacking procedure to be performed. Packing or unpacking of the buffer string is performed whenever a DBGET, DBUPDATE or DBPUT is executed on the specified data set (of the database specified by the last DBASE IS statement). The FREE option allows the automatic packing and unpacking to be turned off.

The IN DATA SET LIST statement is a non-executable statement which is referenced by an IN DATA SET with the USE REMOTE LISTS option. This option is used when the USE list is too long to store as one program line.

The IN DATA SET ... DEFINE TYPE statement can be used to define a type from a data set definition.

DBML Statement Parameters

base$
A string variable which contains the database name.
pass$
A string expression containing a left-justified string.
set
A numeric expression evaluating to a data set number.
set$
A string expression evaluating to a data set name.
mode
A numeric expression evaluating to a valid mode.
status
An integer array containing at least 10 elements in right-most dimension, used to return return codes on most DBML statements.
list$
A string expression evaluating to either "@ ", "@;" or "@". In all but the first case, any arbitrary character sequence can also follow.
buf$
A string variable, without any substring specifiers, which is used to transfer information between an Eloquence program and a database.
qual
A numeric expression evaluating to a valid item, set, or volume number.
qual$
A string expression evaluating to a valid item, set, or volume label.
item list
A list of string or numeric variables (or arrays) which correspond to items in the data set specified in an IN DATA SET statement.
line list
A list of line numbers or labels which appears in an IN DATA SET...USE REMOTE LISTS statement. Each line id must refer to an IN DATA SET LIST statement.
predicate$
A string variable returned by PREDICATE and used as the qualifier parameter by DBLOCK.
value
A string or numeric expression giving the value of the item to be locked.
item
A string expression specifying the data item within the set to be locked.
comment
A string expression providing a comment for the transaction. This string is recorded in the transaction log, however there are currently no tools to review them.

Eloquence Database Manual - 19 DEC 2002