Connect

Description

Connects to the DBMS specified in the connection string of the dbParm property.

Applies to

Web ActiveX Transaction Object control

Syntax

void transaction.Connect( )

Returns

None

Usage

In addition to connecting to the DBMS, you must call SetTransObject to associate the transaction object with the Web ActiveX. You can do this before or after connecting.

If GetSQLCode reports that an error occurred while connecting, check the value returned by GetDBCode to find out more about the error.

Examples

Example 1

This example connects to the DBMS, then associates the transaction object with the Web ActiveX named dw_1:

trans_1.Connect( );

if (trans_1.GetSQLCode( ) != 0) {

		alertBox("Cannot connect to database");

} else {

		dw_1.SetTransObject(trans_1);

}

See also