IBM DB2 Manual page 390

Table of Contents

Advertisement

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374
Application Programming Guide and Reference for Java
Support for read-only connections
With the IBM Data Server Driver for JDBC and SQLJ, you can make a connection
read-only through the readOnly property for a Connection or DataSource object.
The JDBC/SQLJ driver for z/OS does not support read-only connections.
Results returned from ResultSet.getString for a BIT DATA column
The IBM Data Server Driver for JDBC and SQLJ returns data from a
ResultSet.getString call for a CHAR FOR BIT DATA or VARCHAR FOR BIT
DATA column as a lowercase hexadecimal string.
The JDBC/SQLJ Driver for OS/390 and z/OS returns the data in the encoding
scheme of the caller.
Date and time adjustment for input and output values that to do
not correspond to real dates and times
During update or retrieval of data in SQL DATE, TIME, or TIMESTAMP columns,
the IBM Data Server Driver for JDBC and SQLJ adjusts date and time values that
do not correspond to real dates and times. For example, if you update a
TIMESTAMP column with the value 2007-12-31 24:00:00.0, the IBM Data Server
Driver for JDBC and SQLJ adjusts the value to 2008-01-01 00:00:00.0. If you update
a TIMESTAMP column with the value 9999-12-31 24:00:00.0, the IBM Data Server
Driver for JDBC and SQLJ throws an exception because the adjusted value,
10000-01-01 00:00:00.0, is invalid.
The JDBC/SQLJ Driver for OS/390 does no adjustment of date or time values that
do not correspond to real dates or times. That driver passes the values to and from
the database as they are. For example, if you update a TIMESTAMP column with
the value 9999-12-31 24:00:00.0 under the JDBC/SQLJ Driver for OS/390, no
exception is thrown. See the information on date, time, and timestamp values that
can cause problems in JDBC and SQLJ applications for more information.
When an exception is thrown for
PreparedStatement.setXXXStream with a length mismatch
When you use the PreparedStatement.setBinaryStream ,
PreparedStatement.setCharacterStream, or PreparedStatement.setUnicodeStream
method, the length parameter value must match the number of bytes in the input
stream.
If the numbers of bytes do not match, the IBM Data Server Driver for JDBC and
SQLJ does not throw an exception until the subsequent
PreparedStatement.executeUpdate method executes. Therefore, for the IBM Data
Server Driver for JDBC and SQLJ, some data might be sent to the server when the
lengths to not match. That data is truncated or padded by the server. The calling
application needs to issue a rollback request to undo the database updates that
include the truncated or padded data.
The JDBC/SQLJ Driver for OS/390 and z/OS throws an exception after the
PreparedStatement.setBinaryStream, PreparedStatement.setCharacterStream, or
PreparedStatement.setUnicodeStream method executes.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents