When you work with PowerBuilder, you can connect to a database in the development environment or in an application script.
This book describes how to connect to your database in the PowerBuilder development environment.
For information about connecting to a database in a PowerBuilder application script, see Application Techniques.
The following table gives an overview of the connection procedure and indicates where you can find detailed information about each step.
Step |
Action |
Details |
See |
---|---|---|---|
1 |
(Optional) Get an introduction to database connections in PowerBuilder |
If necessary, learn more about how PowerBuilder connects to a database in the development environment |
Chapter 1 (this chapter) |
2 |
Prepare to use the data source or database before connecting to it for the first time in PowerBuilder |
Outside PowerBuilder, install the required network, database server, and database client software and verify that you can connect to the database |
For ODBC data sources: Using the ODBC Interface For OLE DB data sources: Using the OLE DB Interface For ADO.NET data sources: Using the ADO.NET Interface For native database interfaces: Using Native Database Interfaces |
3 |
Install the ODBC driver, OLE DB data provider, ADO.NET data provider, or native database interface |
Install the driver, database provider, or native database interface required to access your data |
For a list of what is supported on your platform: the section called “Database preferences and supported database interfaces” in Connection Reference and the section called “Database parameters and supported database interfaces” in Connection Reference |
4 |
Define the data source (ODBC connections and some OLE DB drivers) |
Create the required configuration for a data source accessed through ODBC |
For ODBC data sources: Using the ODBC Interface |
5 |
Define the database interface |
Create the database profile |
For ODBC data sources: Using the ODBC Interface For OLE DB data sources: Using the OLE DB Interface For ADO.NET data sources: Using the ADO.NET Interface For native database interfaces: Using Native Database Interfaces |
7 |
Connect to the data source or database |
Access the data in PowerBuilder |
|
8 |
(Optional) Set additional connection parameters |
If necessary, set DBParm parameters and database preferences to fine-tune your database connection and take advantage of DBMS-specific features that your interface supports |
For procedures: Setting Additional Connection Parameters For DBParm descriptions: Database Parameters in Connection Reference For database preference descriptions: Database Preferences in Connection Reference |
9 |
(Optional) Troubleshoot the data connection |
If necessary, use the trace tools to troubleshoot problems with your connection |