DBHandle

Description

Reports the handle for your DBMS.

Applies to

Transaction objects

Syntax

transactionobject.DBHandle ( )

Argument

Description

transactionobject

The current transaction object


Return value

Long.

Returns the handle for your DBMS. Transactionobject must exist, and the database must be connected. If transactionobject is null, DBHandle returns null. If transactionobject does not exist, an execution error occurs. If there is not enough memory to connect to your DBMS, DBHandle returns a negative number.

Usage

DBHandle returns a valid handle only if you are connected to the database. It is not able to determine if the database connection does not exist or has been lost.

PowerBuilder uses the database handle internally to communicate with the database. If your database supports an API with functions that PowerBuilder does not support, you can use DBHandle to provide the handle as an argument to one of these external functions.

Examples

For examples, see the section called “DBHandle” in Connecting to Your Database.