Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

UseContextObject – PB Docs 126 – PowerBuilder Library

UseContextObject – PB Docs 126

UseContextObject database parameter

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.

Controls

  • JDB JDBC

  • ODBC

  • O90 Oracle9i

  • SYJ SAP Adaptive Server Enterprise

note.png Database interface restrictions

EAServer requires the SYJ interface

Sybase EAServer uses a slightly different version of the CT-Lib
software. Therefore, at runtime, you need to
use the SYJ database interface rather than ASE or SYC to connect
to an Adaptive Server Enterprise database. The SYJ Database Profile
Setup dialog box provides a convenient way to set the appropriate
connection parameters and then copy the syntax from the Preview
page into the script for your Transaction object.

You cannot use the SYJ interface, however, to connect to the
database in the PowerBuilder development environment. Therefore, during
the development phase
(before the component has been
deployed to EAServer), you must use ASE or SYC to connect to the
database.

Syntax

Default

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 migrate 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.

Because the default Web DataWindow component uses SetTrans to
specify database connection information, you must not set UseContextObject
to Yes in your database profile or in the EAServer properties for
the component.

For information on how to use PowerBuilder to build EAServer
and COM+ components, see Application Techniques.

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:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x