To establish or change a database connection in InfoMaker, use a database profile. You can select the database profile for the database you want to access in the Database Profiles dialog box.
Using the Database painter to select a database profile
The Database painter is an optional InfoMaker painter. If the Database painter is installed, you can select the database profile for the database you want to access from the Database painter's Objects view. However, this method uses more system resources than using the Database Profile dialog box.
You can select a database profile from the Database Profiles dialog box.
To connect to a database using the Database Profiles dialog box:
Database Profile button
If your PowerBar does not include the Database Profile button, use the customize feature to add the button to the PowerBar. Having the Database Profile button on your PowerBar is useful if you frequently switch connections between different databases. For instructions on customizing toolbars, see the User's Guide.
The Database Profiles dialog box displays, listing your installed database interfaces.
Where the interface list comes from
When you run the Setup program, it updates the Vendors list in the registry with the interfaces you install. The Database Profiles dialog box displays the same interfaces that appear in the Vendors list.
-
Click the Database Profile button in the PowerBar.
or
Select Tools>Database Profile from the PowerBar.
-
Click the plus sign (+) to the left of the interface you are using.
or
Double-click the name.
The list expands to display the database profiles defined for your interface.
-
Select the name of the database profile you want to access and click Connect.
or
Display the pop-up menu for a database profile and select Connect.
InfoMaker connects to the specified database and returns you to the painter workspace.
Database painter Objects view
You can select a database profile from the Database painter Objects view.
To connect to a database using the Database painter:
-
Click the Database painter button in the PowerBar.
The Database painter displays. The Objects view lists your installed database interfaces.
Where the interface list comes from
When you run the Setup program, it updates the Vendors list in the registry with the interfaces you install. The Database painter Objects view displays the same interfaces that appear in the Vendors list.
-
Click the plus sign (+) to the left of the interface you are using.
or
Double-click the name.
The list expands to display the database profiles defined for your interface.
-
Select the name of the database profile you want to access and click the Connect button.
or
Display the pop-up menu for a database profile and select Connect.
Connection parameters
When you connect to a database by selecting its database profile, InfoMaker writes the profile name and its connection parameters to the registry key HKEY_CURRENT_USER\Software\Sybase\PowerBuilder\18.0\DatabaseProfiles\PowerBuilder.
Each time you connect to a different database, InfoMaker overwrites the "most-recently used" profile name in the registry with the name for the new database connection.
What you get connected to
When you start InfoMaker (with the Automatically Connect to Database system option selected) or open a painter that accesses the database, you are connected to the database you used last. InfoMaker determines which database this is by reading the registry.
As shown in the completed Database Profile Setup dialog box for Employees, your password does not display when you specify it in the Database Profile Setup dialog box.
However, when InfoMaker stores the values for this profile in the registry, the actual password does display, albeit in encrypted form, in the DatabasePassword or LogPassword field.
Suppressing display in the profile registry entry
To suppress password display in the profile registry entry, do the following when you create a database profile.
To suppress password display in the profile registry entry:
-
Select the Prompt For Database Information check box on the Connection tab in the Database Profile Setup dialog box.
This tells InfoMaker to prompt for any missing information when you select this profile to connect to the database.
-
Leave the Password box blank. Instead, specify the password in the dialog box that displays to prompt you for additional information when you connect to the database.
What happens
When you specify the password in response to a prompt instead of in the Database Profile Setup dialog box, the password does not display in the registry entry for this profile.
For example, if you do not supply a password in the Database Profile Setup - Adaptive Server Enterprise dialog box when creating a database profile, the Client Library Login dialog box displays to prompt you for the missing information.