In InfoMaker when you access a database through the JDBC interface, your connection goes through several layers before reaching the database. It is important to understand that each layer represents a separate component of the connection, and that each component might come from a different vendor.
Because JDBC is a standard API, InfoMaker uses the same interface to access every JDBC-compliant database driver.
Figure 3-1 shows the general components of a JDBC connection.
Figure 3-1: Components of a JDBC connection
InfoMaker provides the pbjdb125.dll. This DLL runs with the Sun Java Runtime Environment (JRE) versions 1.1 and later.
InfoMaker includes a small package of Java classes that gives the JDBC interface the level of error-checking and efficiency (SQLException catching) found in other InfoMaker interfaces. The package is called pbjdbc12125.jar and is found in Sybase\Shared\PowerBuilder.
The Java Virtual Machine (JVM) is a component of Java development software. When you install InfoMaker, the Sun Java Development Kit (JDK), including the Java Runtime Environment (JRE), is installed on your system in Sybase\Shared\PowerBuilder. For InfoMaker 12.5, JDK 1.5 is installed. This version of the JVM is started when you use a JDBC connection or any other process that requires a JVM and is used throughout the InfoMaker session.
If you need to use a different JVM, see the instructions in “Preparing to use the JDBC interface”. For more information about how the JVM is started, see the chapter on deploying your application in the Users Guide.
The JDBC interface can communicate with any JDBC-compliant driver including Sybase jConnect™ for JDBC (available with Sybase ASE, IQ, and SA database clients) and the Oracle and IBM Informix JDBC drivers. These drivers are native-protocol, all-Java drivers—that is, they convert JDBC calls into the SQL syntax supported by the databases.
Using the ODBC interface, InfoMaker can connect, save, and retrieve data in both ANSI/DBCS and Unicode databases but does not convert data between Unicode and ANSI/DBCS. When character data or command text is sent to the database, InfoMaker sends a Unicode string. The driver must guarantee that the data is saved as Unicode data correctly. When InfoMaker retrieves character data, it assumes the data is Unicode.
A Unicode database is a database whose character set is set to a Unicode format, such as UTF-8, UTF-16, UCS-2, or UCS-4. All data must be in Unicode format, and any data saved to the database must be converted to Unicode data implicitly or explicitly.
A database that uses ANSI (or DBCS) as its character set might use special datatypes to store Unicode data. Columns with these datatypes can store only Unicode data. Any data saved into such a column must be converted to Unicode explicitly. This conversion must be handled by the database server or client.