Dynamic transaction object to data source mapping

Transaction object to data source mapping can be dynamically set up or changed by setting or changing the DBMS and DBParm properties of the Transaction object in the application source code.

To set or change the data source dynamically, code the DBParm property of the Transaction object in this format:

SQLCA.DBParm="CacheName='ASADataSource1'"

"ASADataSource1" can be replaced by the name of the data source you want to use for the Transaction object.

To set or change the database type dynamically, code the DBMS property of the Transaction object using this format:

SQLCA.DBMS = "ODB-ASA"

The value of the DBMS property should be set based on the database type; refer to the table below.

Table 19. Setting the DBMS property based on the database type

Database Type

ODBC Interface

JDBC Interface

OLE Interface

Native Interface

MS SQL Server

ODB-MSS

JDB-MSS

OLE-MSS

MSS

Oracle 8i

ODB-O84

JDB-O84

OLE-O84

O84

Oracle 9i

ODB-O90

JDB-O90

OLE-O90

O90

Oracle 10g/11g

ODB-O10

JDB-O10

OLE-O10

O10

SAP Sybase ASE

ODB-SYC

JDB-SYC

OLE-SYC

SYC

SAP Sybase ASA/SQL Anywhere

ODB-ASA

JDB-ASA

OLE-ASA

-

SAP HANA

ODB-HAN

JDB-HAN

-

-

Informix

ODB-IN9

JDB-IN9

OLE-IN9

IN9

MySQL

ODB-MYS

JDB-MYS

-

-

Teradata

ODB-TER

JDB-TER

-

-


In the table above:

  • The names are not case-sensitive (for example: ODBC is the same as odbc).

  • If ODB or ODBC is set as the DBMS property, Appeon will regard the database type as SAP Sybase ASA/SQL Anywhere. The "odb-asa" and "odb-db2" are Appeon defined values. They can be recognized by Appeon without affecting the running of the PowerBuilder application, because only the first three letters of the DBMS setting are valid in PowerScript syntax.