JDBC Type 4 Driver 2.0 Programmer's Reference (SQL/MX 2.x)
, 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
ISO88591 ISO88591_1
KANJI SJIS
KSC5601 EUC_KR
A description of these character sets appears in the following table, which summarizes the character sets supported by
SQL/MX.
Table 3.1. Corresponding SQL/MX Character Sets and Java Encoding Sets
SQL/MX Character Set
Corresponding Java Encoding
Set—Canonical Name for java.io and
java.lang API
Description
ISO88591 ISO88591_1
Single-character, 8-bit, character set for
character-data type. ISO88591 supports English
and other Western European languages










