1. Sim Joo Pee
  2. PowerServer
  3. Wednesday, 24 May 2023 01:53 AM UTC

Hi Master,

  My application is connecting to one database server and transaction updates to two different database('Data_PG' and 'Data_PG_S'), see attachment, app.ini file.  After deployed to PowerServer and run, i had trouble to updates to second database(data_PG_S), can anyone guide me? Thanks.

See below for more details

n_tr_lo = CREATE transaction
n_tr_lo .dbms=ProfileString('app.ini', gs_safeguard_Section, 'dbms', '')
n_tr_lo .Database =ProfileString('app.ini', gs_safeguard_Section, 'database', '')
n_tr_lo .ServerName =ProfileString('app.ini', gs_safeguard_Section, 'servername', '')
n_tr_lo .DBParm = ProfileString('app.ini', gs_safeguard_Section, 'DBParm', '')
n_tr_lo .logid = SQLCA.logid
n_tr_lo .logpass = SQLCA.logpass

 

 

Attachments (1)
Sim Joo Pee Accepted Answer Pending Moderation
  1. Friday, 2 June 2023 03:05 AM UTC
  2. PowerServer
  3. # 1

Hi Master,

I have another question. We are using of_init to connect to database server as per the app.ini that provided in the application. By looking at the PowerServer database/cache setup, i felt that, the app.ini doesnt seem has it functionality anymore. Looks like it is strictly using the database connection information from what we setup at the powerserver settings.

We have several database server, for testing...etc. Thus, how to make connection to different db at one application. ANy suggestion?

In old way, we just modify the app.ini servername ='173.1.1.1'

Comment
  1. Chris Pollach @Appeon
  2. Friday, 2 June 2023 16:13 PM UTC
PS 2022 does NOT use your PB App's SQLCA settings.

PS uses it;s own DB Client configuration as all it's DB drivers are native C# downloaded from the DBMS vendor as a Nuget package.
  1. Helpful
  1. Sim Joo Pee
  2. Tuesday, 6 June 2023 03:13 AM UTC
Hi Chris,



Thanks. Means, xxx.ini in my application is useless in db connection. Thus, i just setup different dbclient on PS, but, i dnt know what end user need to do in order to connect to different db? For eg, when i provide this URL link to end user 177.8.8.11/test_cloud , how to make it connect to another db and not this one? Can you teach me? Thank you.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 6 June 2023 11:42 AM UTC
PowerServer will look for the DBParm setting "CacheName=xxxxx" setting in your App's SQLCA object on a Connect. The CacheName mapping in PS will then be used. Each CacheName can represent a different DBMS/DB instance.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 24 May 2023 05:19 AM UTC
  2. PowerServer
  3. # 2

Hi Sim,

I don't understand clearly the trouble you encountered.

1) Have you ever configured the second cache for the second database and mapped it to n_tr_lo?

https://docs.appeon.com/ps2022/Creating_transaction-to-cache_mappings_in_the_project_settings.html

2) If you want to specify LogID and LogPass dynamically, please refer to https://docs.appeon.com/ps2022/Using_LogID_and_LogPass_properties1.html

3) You can also learn the supported connection options from: https://docs.appeon.com/ps2022/Supported_database_connection_options.html

Regards, Logan

Comment
  1. Sim Joo Pee
  2. Friday, 26 May 2023 05:16 AM UTC
Hi ,

I tried option1, i added and it seemed working now. Let me explore further, to see, if anything else that i missed. Thanks a lot for your kind assistance
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 26 May 2023 17:32 PM UTC
That is great news Sim .. thanks for letting us know!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.