Hi,
PowerServer supports Dynamic transaction object to data source mapping, you can create multiple data sources to connect different database. Please refer to the following steps:
1. Add data source pointing to different database in AEM;
2. Follow below online help documentation to setup transaction object to data source mapping using dynamic transaction in Appeon Web Application rather than doing it in AEM.
https://www.appeon.com/support/documents/appeon_online_help/2017/server_configuration_guide_for_net/Dynamic_transaction_object_to_connection_cache_mapping.html
You can modify code like SQLCA.DBParm="CacheName='ASADataSource1'" to connect different data sources.
ASADataSource1 is a name of data source.
For example(please note the DBMS of ASE is ODB-SYC):
SQLCA.DBMS = "ODB-SYC"
SQLCA.AutoCommit = False
Choose Case db_name
Case 'PROD'
SQLCA.DBParm="CacheName='appeonsample'"
Case 'DEV'
SQLCA.DBParm="CacheName='appeonsample2'"
End Choose
And you can enable the Dynamic Database Connection option in AEM> Server> Resources> Data Source>[data source name] and specify the user name and password to connect to the database. More details please refer to the Appeon Help > Appeon Server Configuration Guide for .NET> AEM User Guide> Server> Resources> Data Source> Adding a data source section or the online help at:
http://www.appeon.com/support/documents/appeon_online_help/2015/server_configuration_guide_for_net/ch04s03s03.html#Adding_connection_cache
Then you can use the script like below to specify the user/password to connect to the database.
SQLCA.LogId = %your id%
SQLCA.LogPass=%your pass%
Just for your reference, when the Dynamic Database Connection feature is turned on the LogID and LogPass of the Transaction object will be used to connect to the database; when it is turned off then the user name and password specified in the data source will be used to connect to the database.
Regards,
ZhaoKai