Oracle8i JDBC Developer's Guide and Reference
Release 8.1.5

A64685-01

Library

Product

Contents

Index

Prev  Chap Top Next

Oracle JDBC Notes and Limitations

The following limitations exist in the Oracle JDBC implementation, but all are either insignificant or have easy work-arounds.

CursorName

Oracle JDBC drivers do not support the getCursorName() and setCursorName() methods because there is no convenient way to map them to Oracle constructs. Oracle recommends using ROWID instead. For more information on how to use and manipulate ROWIDs, see "Oracle ROWID Type".

SQL92 Outer Join Escapes

Oracle JDBC drivers do not support SQL92 outer join escapes. Use Oracle SQL syntax with "(+)" instead. For more information on SQL92 syntax, see "Embedded SQL92 Syntax".

PL/SQL TABLE, BOOLEAN and RECORD Types

Oracle JDBC drivers do not support calling arguments or return values of the PL/SQL TABLE, BOOLEAN, or RECORD types. This is a restriction of the OCI layer.

As a work-around for booleans, you can define an additional PL/SQL stored procedure that accepts the BOOLEAN argument as a CHAR or NUMBER and passes it as a BOOLEAN to the original stored procedure. For more information on this topic, see "Boolean Parameters in PL/SQL Stored Procedures".

IEEE 754 Floating Point Compliance

The arithmetic for the Oracle NUMBER type does not comply with the IEEE 754 standard for floating-point arithmetic. Therefore there can be small disagreements between the results of computations performed by Oracle and the same computations performed by Java.

Oracle stores numbers in a format compatible with decimal arithmetic and guarantees 38 decimal digits of precision. It represents zero, minus infinity, and plus infinity exactly. For each positive number it represents, it represents a negative number of the same absolute value.

It represents every positive number between 10-30 and (1 - 10-38) * 10126 to full 38-digit precision.

Read-Only Connection

The read-only connection is not supported. There is no Oracle equivalent to the read-only connection.

Catalog Arguments to DatabaseMetaData Calls

Certain DatabaseMetaData methods define a catalog parameter. This parameter is one of the selection criteria for the method. Oracle does not have multiple catalogs, but it does have packages. For more information on how the Oracle JDBC drivers treat the catalog argument, see "DatabaseMetaData TABLE_REMARKS Reporting".

SQLWarning Class

The java.sql.SQLWarning class provides information on a database access warning. Warnings typically contain a description of the warning and a code that identifies the warning. Warnings are silently chained to the object whose method caused it to be reported. The Oracle JDBC drivers do not support SQLWarning.

For information on how the Oracle JDBC drivers handle errors, see "Error Messages and JDBC".

Bind by Name

Bind by name is not supported. Under certain circumstances previous versions of the Oracle JDBC drivers have allowed binding statement variables by name. In the following statement, the named variable EmpId would be bound to the integer 314159.

PreparedStatement p = conn.prepareStatement("SELECT name FROM EMP 
    WHERE id = :EmpId"); 
  p.setInt(1, 314159); 
 

The capability is not part of the JDBC specification, either 1.0 or 2.0, and Oracle does not support it. The JDBC drivers can throw a SQLException or produce unexpected results.

Prior releases of the Oracle JDBC drivers did not retain bound values from one call of execute to the next as specified in JDBC 1.0. Bound values are now retained. For example:

PreparedStatement p = conn.prepareStatement("SELECT name FROM EMP 
        WHERE id = :? AND dept = :?"); 
  p.setInt(1, 314159); 
  p.setString(2, "SALES"); 
  ResultSet r1 = p.execute(); 
  p.setInt(1, 425260); 
  ResultSet r2 = p.execute();  

Previously a SQLException would be thrown by the second execute since no value was bound to the second argument. In this release, the second execute will return the correct value, retaining the binding of the second argument to the string "SALES".

If the retained bound value is a stream, then the Oracle JDBC drivers will not reset the stream. Unless the application code resets, repositions, or otherwise modifies the stream, the subsequent execute calls will send NULL as the value of the argument.




Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index