What happens when you connect

When you connect to a database by selecting its database profile, PowerBuilder writes the profile name and its connection parameters to the registry key HKEY_CURRENT_USER\Software\Sybase\PowerBuilder\12.5\ DatabaseProfiles\PowerBuilder.

Each time you connect to a different database, PowerBuilder overwrites the “most-recently used” profile name in the registry with the name for the new database connection.

When you open a painter that accesses the database, you are connected to the database you used last. PowerBuilder determines which database this is by reading the registry.

The three-letter abbreviation for the database interface followed by the name of the database profile displays in PowerBuilder's main title bar. If you are working with a report, this visual cue makes it easier to check that you are using the right connection. For example, if you open the PowerBuilder Code Examples workspace and connect to the EAS Demo database, the title bar displays “pbexamples - ODB [EAS Demo DB V125] - PowerBuilder.”