Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Defining the JDBC interface – PB Docs 100 – PowerBuilder Library

Defining the JDBC interface – PB Docs 100

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 at any time 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, enter
    the following values in the Driver-Specific Properties field:

  • 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 connection
    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:

note.gif Specifying properties when connecting to jConnect If you plan to use the blob datatype in PowerBuilder, you should
be aware that jConnect imposes a restriction on blob size. Consequently,
before you make your database connection from PowerBuilder, you might
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 page. The SQLINITSTRING property
is used to define commands to be passed to the back-end database
server:

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.

Specifying the appropriate Java Virtual Machine
(JVM)

Since the JDB interface supports several JVMs, you must specify
which version of the JVM you want to use. For consistent behavior,
the same version of the JVM used during development should be used
at runtime.

Set the JavaVM DBParm on the Options tab page to select the
appropriate JVM. The default value is JRE 1.4. Table 3-1 lists the supported
JVMs and their corresponding JavaVM DBParm value.

Table 3-1: Available Java VMs and JavaVM
DBParm values
JVM DBParm Value
Sun JRE 1.2 Sun1.2
Sun JRE 1.3 Sun1.3
Sun JRE 1.4 Sun1.4

You do not need to set this DBParm for a PowerBuilder component
running in EAServer.

note.gif Selecting the JVM for a component deployed to EAServer If a PowerBuilder component running in EAServer makes a database connection
using JDBC, the JDB interface verifies that the JVM used by EAServer matches the JVM selected
in the PowerBuilder database profile. If the versions do not match,
the JDB interface overrides the profile setting and uses the EAServer JVM. It also enters
a warning in the EAServer log
file. (The EAServer log
file records errors relating to component execution. You can view
its contents using the Jaguar Manager File Viewer.)


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x