ReleaseConnectionOption

Description

Specifies how EAServer should behave when it releases control of a connection. This parameter applies only when a PowerBuilder custom class user object is deployed as an EAServer component.

Applies to

Syntax

ReleaseConnectionOption = 'value'

Parameter

Description

value

Specifies how EAServer should behave when it releases control of a connection. Values are:

  • JAG_CM_UNUSED (Default) A connection taken from a cache is placed back in the cache and a connection created outside of a cache is closed and destroyed.

  • JAG_CM_DROP The connection is forced to close and is deallocated. If the connection came from a cache, a new connection is created in its place.

Default

ReleaseConnectionOption = 'JAG_CM_UNUSED'

Usage

Use JAG_CM_DROP to destroy a connection when errors have made it unusable. This parameter cannot be set dynamically. The value set when the connection is made remains in effect until it is disconnected.

NoteUsing 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 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 tab 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 SYC to connect to the database.

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

Examples

Example 1

On the EAServer tab in the Database Profile Setup dialog box, select JAG_CM_DROP from the Release Connection Option drop-down list. The PowerScript syntax for the ReleaseConnectionOption parameter displays on the Preview tab:

SQLCA.DBParm = "ReleaseConnectionOption = 'JAG_CM_DROP'"

Copy the syntax from the Preview tab into your script.

See also