Defining the JDBC interface
Defining the profile
To define a connection through the JDBC interface, you must
create a database profile by supplying values for at least the basic
connection parameters in the Database Profile Setup – JDBC dialog
box. You can then select this profile anytime to connect to your
database in the development environment.
For information on how to define a database profile, see “Using database profiles”.
Specifying connection parameters
To provide maximum flexibility (as provided in the JDBC API),
the JDBC interface supports database connections made with different
combinations of connection parameters:
- Driver name, URL, and Properties You should specify values for this combination of connection
parameters if you need to define driver-specific properties. When
properties are defined, you must
also define
the user ID and password in the properties field.
For example, when connecting to the jConnect driver, the following
values should be entered in the Driver-Specific Properties field:1SQLINITSTRING=set TextSize 2; user=system;password=manager;
- Driver name, URL, User ID, and Password You should specify values for this combination of connection
parameters if you do not need to define any driver-specific properties. - Driver name and URL You should specify values for this combination of connections
parameters when the user ID and password are included as part of
the URL.
For example, when connecting to the Oracle JDBC driver, the
URL can include the user ID and password:1jdbc:oracle:thin:userid/password@host:port:dbname
Specifying properties when connecting to jConnect If you plan to use the blob data type in PowerBuilder, you should
be aware that jConnect imposes a restriction on blob size. Consequently,
before you make your database connection from PowerBuilder, you may
want to reset the blob size to a value greater than the maximum
size you plan to use.
To set blob size, define the jConnect property SQLINITSTRING
in the Driver-Specific Properties box on the Connection tab. The
SQLINITSTRING property is used to define commands to be passed to
the backend database server.
1 |
SQLINITSTRING=set TextSize 32000; |
Remember that if you define a property in the Driver-Specific
Properties box, you must also define the user ID and password in
this box.