ASE Chained mode issue

A PowerBuilder application can execute ASE stored procedures successfully. However, when the PowerBuilder application is converted to the Web, the following error may occur:

"Select error: Stored procedure 'dbo.up_edw001_001' may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode".

Cause: There are three ASE stored procedure (SP) modes: chained, unchained and anymode. There are two ASE transaction modes: chained and unchained. For Web applications:

1) If the transaction mode is chained, the SP running mode must be chained or anymode.

2) If the transaction mode is unchained, the SP running mode must be unchained or anymode.

3) If the transaction mode and SP mode do not match the requirements in 1) or 2), the error occurs.

Solution: Appeon provides two stored procedures that help modify the modes of ASE stored procedures to ensure that the stored procedures meet the requirements in 1) or 2). The following files are located in the "\sql\asechain_sql" folder under the PowerServer installation directory.

  • readme.txt

  • install_appeon_rebuildchainmode.sql: modifies the modes of ASE stored procedures

  • uninstall_appeon_rebuildchainmode.sql: restores the original modes of ASE stored procedures

Follow the instructions in the "readme.txt" for the method of modifying the stored procedure modes with the two SQL files.