Accessing data in PowerBuilder
There are several ways to access data in the
PowerBuilder development environment:
-
Through one of the standard database interfaces such as
ODBC, JDBC,ADO.NET, or OLE DB -
Through one of the native database interfaces
Standard database interfaces
A standard database interface communicates with a database through a
standard-compliant driver (in the case of ODBC and JDBC) or data provider
(in the case of OLE DB and ADO.NET). The standard-compliant driver or data
provider translates the abstract function calls defined by the standard’s
API into calls that are understood by a specific database. To use a
standard interface, you need to install the standard’s API and a suitable
driver or data provider. Then, run the PowerBuilder installer to install the standard database interface you
want to use to access your DBMS.
PowerBuilder currently supports the following standard
interfaces:
-
Open Database Connectivity (ODBC)
-
Java Database Connectivity (JDBC)
-
Microsoft’s Universal Data Access Component OLE DB
-
Microsoft’s ADO.NET
Native database interfaces
A native database interface communicates with a database through a
direct connection. It communicates to a database using that database’s
native API.
To access data through one of the native database interfaces, you
must first install the appropriate database software on the server and
client workstations at your site. Then, run the PowerBuilder Installer to install the native database
interface that accesses your DBMS.
For example, if you have the appropriate SAP Adaptive Server
Enterprise server and client software installed, you can access the
database by installing the Adaptive Server Enterprise database
interface.
Loading database interface libraries
PowerBuilder loads the libraries used by a database interface when
it connects to the database. PowerBuilder does not automatically free the
database interface libraries when it disconnects.
Although memory use is somewhat increased by this technique (since
the loaded database interface libraries continue to be held in memory),
the technique improves performance and eliminates problems associated with
the freeing and subsequent reloading of libraries experienced by some
database connections.
If you want PowerBuilder to free database interface libraries on
disconnecting from the database (as it did prior to PowerBuilder 8), you
can change its default behavior:
|
To change the default behavior for |
Do this |
|---|---|
|
Connections in the development |
Select the Free Database Driver Libraries On |
|
Runtime connections |
Set the FreeDBLibraries property of the Application |