An application can connect to two different databases. To change the connection, the user needs the database credentials and other related information, but this information should not be available to the user. Information about the currently configured connection is stored in the registry.
To let the user choose which database to connect to when the application starts up:
- Create two Workspace Containers, both with the same Computer Control and the same Access Control. Make sure the names of the Workspace Containers are meaningful to the user of the application, for example by including the database name.
- On the application, create a User Registry Action for each database connection. Link each Action to a different Workspace Container.
- Add both Workspace Containers to Access Control of the application, and select the option Let user decide which accessible workspace container to use.
As a result, when users start the application, they will be asked to choose an option (= Workspace Container), and the database connection data in the registry will be set according to the Workspace Container selected.