Communicator e3000 MPE/iX Release 6.5 (Non-Platform Software Release C.65.00 (30216-90291)

158 Chapter5
Internet and Interoperability
HP Driver for JDBC
could result in a java.lang.NumberFormatException being shown when the conversion is
performed. Again, the application developer should take the necessary precautions.
Unsupported ALLBASE/SQL Data Types
The ALLBASE LONG BINARY, and LONG VARBINARY data types are currently not supported
by the HP Driver for JDBC.
Acceptable SQL Syntax
The HP JDBC Server accepts either ODBC SQL statement syntax or ALLBASE/SQL
statement syntax. All SQL statements are first parsed for ODBC 2.0 SQL syntax. If the
statement conforms to the ODBC 2.0 SQL syntax, it is translated to ALLBASE/SQL before
being passed to the ALLBASE/SQL DBMS. If the statement does not conform to the ODBC
2.0 SQL syntax rules, it is assumed to be an ALLBASE/SQL statement, and is passed
without modification to the ALLBASE/SQL SQL DBMS.
Unsupported ALLBASE/SQL SQL Statements
Table 5-3. shows a list of unsupported ALLBASE/SQL statement types in HP JDBC. Note
that in many cases, JDBC provides a standardized method of performing the same action.
For example, the ALLBASE/SQL “COMMIT WORK” statement is not supported, since the
user should be using the java.sql.Connection.commit method.
Dynamic/Parameterized SQL Statements
The HP Driver for JDBC supports the use of parameterized SQL statements through the
java.sql.PreparedStatement interface. The SQL statements must use a question mark
(?) as the marker character for passing the parameters.
For example, a SELECT statement with parameters in the where clause would look like:
SELECT NAME, ADDRESS FROM ADDRBOOK WHERE NAME=?
Another example is an INSERT statement:
INSERT INTO ADDRBOOK(NAME, ADDRESS) VALUES (?,?)
Table 5-3. Unsupported Statements
ADVANCE BEGIN DECLARE SECTION BEGIN WORK
CLOSE COMMIT WORK CONNECT
DECLARE CURSOR DELETE WHERE CURRENT DESCRIBE
DISCONNECT END DECLARE SECTION EXECUTE
EXTRACT FETCH INCLUDE
OPEN PREPARE RELEASE
ROLLBACK WORK SET CONNECTION SET SESSION
SET TRANSACTION SETOPT START DBE
STOP DBE SQLEXPLAIN UPDATE WHERE CURRENT
TERMINATE USER WHENEVER