The dynamic transaction object to data source mapping help to connect to different database.
And the dynamic Database Connection option in AEM help to connect to database with different DB user/password.
1- Dynamic transaction object to data source mapping
Appeon 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. http://www.appeon.com/support/documents/appeon_online_help/2015/server_configuration_guide_for_net/ch03s05s01.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 ASA is 'ODB-ASA'):
SQLCA.DBMS = "ODB-ASA" SQLCA.AutoCommit = False
Choose Case db_name Case 'PROD' SQLCA.DBParm="CacheName='appeonsample'" Case 'DEV' SQLCA.DBParm="CacheName='appeonsample2'" End Choose
2- Dynamic Database Connection And you can enable the Dynamic Database Connection option in AEM> Server> Resources> Data Source>[data source name](see attached) 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.
|