DB_CONNECT action


Function
The action establishes connection to a table in a database.
Declaration
 DB_CONNECT dbObjIdent, accessIdent_Int, handleIdent_Int, retCodeIdent_Int [TRANS transHandle_Int]

Parameters
dbObjIdent

in

Reference to an object of Database table type.
accessIdent_Int in Value identifier - required access to database (_DB_READ, _DB_MODIFY).
handleIdent_Int out Identifier for the unique handle of the table connection.
retCodeIdent_Int out Return code identifier.
transHandle_Int

in

Identifier for the unique handle of the database connection.

Return code
The value of the parameter transHandle_Int. See the table of error codes. It is possible to get extended error information.
Description
Identifier for the number (handle) of the table connection is used for the next work with the actions DB_*. Return code describes the action success (__ERR_NO_ERROR).

For every opening a table by the script, there is assigned an unique number (identifier, handle). Having finished work with the table, it is necessary to close this number using  the action DB_DISCONNECT. While all tables are not closed by calling the action DB_DISCONNECT after the script execution (opened by the script during its action), they are to be internally automatically closed. Handle may be transferred between ESL scripts in one process.

The value transHandle_Int must be gained by calling the action DB_TRANS_OPEN. If the identifier transHandle_Int is not used, the table connection will be executed by means of Automatic connection.


Napíšte komentár