JDBC Type 4 Driver 1.1 Programmer's Reference
corruption.
"Update ... Where Current of" Operations
The fetch size on a ResultSet must be 1 when performing an update ... where current of cursor SQL statement.
If the value of the fetch size is greater than 1, the result of the update ... where current of operation might be one of
the following:
An incorrect row might be updated based on the actual cursor position.●
An SQLException might occur because the cursor being updated might have already been closed.●
Note: By default, the fetch size is 1.
The following is an example of setting a result set's fetch size to 1 and executing an update ... where current of
cursor SQL statement.
ResultSet rs;
...
rs.setFetchSize(1);
String st1 = rs.getCursorName();
Statement stmt2 = connection.createStatement( ResultSet.TYPE_FORWARD_ONLY
, ResultSet.CONCUR_UPDATABLE );
stmt2.executeUpdate("UPDATE cat2.sch2.table1
set j = 'update row' WHERE CURRENT OF " + st1);
Internationalization (I18N) Support
When String Literals Are Used in Applications
Controlling String Literal Conversion by Using the Character-Set Properties
Trimming Padding for Fixed-Length Character Columns
Localizing Error Messages and Status Messages
When String Literals Are Used in Applications
Internationalization support in the driver affects the handling of string literals. The Type 4 driver handles string literals in two
situations.
When the driver processes an SQL statement. For example,
Statement stmt = conection.getStatement();
stmt.execute(“select * from table1 where col1 = ‘abcd’”);
●
When the driver processes JDBC parameters. For example,
PreparedStatement pStmt = connection.prepareStatement(“select * from table1 where
col1 = ?”);
pStmt.setString(1, “abcd”);
●
To convert a string literal from the Java character set to an array of bytes for processing by the SQL/MX engine, the Type 4
driver uses the column type and character set in the database. For information about column data types and character sets, see
the SQL/MX Reference Manual.
Controlling String Literal Conversion by Using the Character-Set Properties
The Type 4 driver provides character-set mapping properties. These properties allow you to explicitly define the translation of
internal SQL/MX database character-set formats to and from the Java string Unicode (UnicodeBigUnmarked) encoding.
The Type 4 driver provides the following character-set mapping properties using key values as follows:
Key Default Value