Tutorial: Connecting to the Database provides step-by-step instructions for how to connect to different types of database from the PowerBuilder IDE.
The following uses the SQL Anywhere database as an example.
To configure the database connection in the PowerBuilder IDE:
-
In the PowerServer project painter, select the Database page > Basic tab.
For example, you can establish a connection with the SQL Anywhere database for the PowerBuilder demo using the following settings:
-
Select SQL Anywhere (ODBC) from the Provider list.
-
Specify any text as the cache name.
-
Select the data source.
-
Specify the user name (for example, dba) and password (for example, sql).
-
Click Test Connection to make sure the database can be connected successfully.
The "Allow dynamic connection using the transaction LogID and LogPass" option allows the application to use the LogID and LogPass property values of the Transaction object to log in to the database server as shown in the example below (instead of using the values in the User name and Password fields). For more, refer to Using LogID and LogPass properties.
The More button contains additional important settings for the database driver such as DelimitIdentifier, TrimSpaces, etc. If your database has such settings, make sure to click the More button to configure those settings.
-