UseContextObject (obsolete)

Description

Specifies that PowerBuilder controls a transaction using the transaction service context object TransactionServer. This parameter applies only when a PowerBuilder custom class user object is deployed as an EAServer or COM+ component.

Obsolete parameter

UseContextObject parameter is obsolete, because EAServer is no longer supported since PowerBuilder 2017.

Applies to

ODBC

O90 Oracle9i

Syntax

UseContextObject='value'

Default value

UseContextObject=No

Usage

PowerBuilder provides a transaction service context object called TransactionServer that gives you access to the transaction state primitives that influence whether EAServer or COM+ commits or aborts the current transaction. If you use the TransactionServer context object by setting the UseConnectObject parameter to Yes, COMMIT and ROLLBACK statements called on the Transaction object result in a runtime error.

By default, the TransactionServer context object is not used. Instead, you can use COMMIT and ROLLBACK statements to manage transactions. In this case, COMMIT is interpreted as a SetComplete function and ROLLBACK is interpreted as a SetAbort function. This approach is recommended only when you want to upgrade PowerBuilder 6.x or prior objects to EAServer or COM+ without modifying the code.

Setting UseContextObject to Yes is incompatible with the use of the SetTrans function. The SetTrans function is used when you want the DataWindow engine to manage database connections, transaction state primitives, and related EAServer component deactivation.

Examples

To use the TransactionServer context object:

  • Database profile

    Select the Use Transaction Context Object check box on the EAServer or EAServer/COM+ page in the Database Profile Setup dialog box.

  • Application

    Type the following in code:

    SQLCA.DBParm="UseContextObject='Yes'"

See also

CacheName (obsolete)

GetConnectionOption (obsolete)

ReleaseConnectionOption (obsolete)