Techniques for supporting various connection scenarios

A few settings are available in the PowerServer project settings and also in the PowerServer solution to assist you to handle various connection scenarios. Specifically:

  1. If as the app developer, you want to switch between different development, testing and even production environment for running the app.

    Technique: Configuring different DB connection profiles in the PowerServer project settings. If you define the database connections in multiple profiles, the PowerServer project will be compiled against all the configured profiles. When you run the PowerServer Web APIs, you can select the actual connection profile with which the Web APIs will run.

  2. If as the app developer, you want to assign different database access, to different app users.

    Technique: Enabling the "Allow dynamic connection using the transaction LogID and LogPass" option in the cache settings. The LogID and LogPass may be unique to each app user. If you enable this option, the database connection will be set up according to the access permission associated with the LogID and LogPass.

  3. If as the app distributor (or independent software vendor), you want to have the deployed app working in customer-specific database environment.

    Technique: Configuring different cache groups (DBParm CacheGroup property)

    You can define multiple database connection scenarios in the cache groups, through changing the PowerServer C# solution or dynamically calling the PowerServer APIs in PowerScript. Then, you can dynamically specify the CacheGroup value in DBParm, so that the deployed application will work in different database connection scenarios for different use cases.

  4. If as the app administrator, you have updated the database environment and want to enable the Web APIs to work with the updated databases.

    Technique: Directly updating the connection settings in the Applications.json file

    The Applications.json file can be edited even after the Web APIs have been compiled. If the changes are minor, you can directly update the Applications.json file as the temporary solution.