Fabricante : HP
Arquivo Tamanho: 365.28 kb
Arquivo Nome :
|
por este dispositivo também tem outras instruções :
Facilidade de uso
Double-character character set required on
systems used by government and banking within
KSC5601
EUC_KR
Korea. KSC5601 encoding is big endian. Note:
KSC5601 is supported in SQL/MP tables only.
For detailed information about these properties, see ISO88591 Property, KANJI Property or KSC5061 Property.
Using the Character-Set Properties
The java.sql.PreparedStatement class contains the methods setString() and setCharacterStream().
These methods take a String and Reader parameter, respectively.
The java.sql.ResultSet class contains the methods getString() and getCharacterStream(). These methods return a
String and Reader, respectively.
Retrieving a Column
When you retrieve a column as a String (for example, call the getString() or getCharacterStream methods), the
Type 4 driver uses the character-set mapping property key to instantiate a String object (where that key corresponds to the
character set of the column). For example: the following SQL create table statement creates a table that has an ISO88591
column
create table t1 (c1 char(20) character set ISO88591)
The JDBC program uses the following java command to set the ISO88591 property and issues the getString() method.
java –Dt4sqlmx.ISO88591=SJIS test1.java
// The following method invocation returns a String object, which
// was created using the “SJIS” Java canonical name as the charset
// parameter to the String constructor.
String s1 = rs.getString(1); // get column 1 as a String
Setting a Parameter
When you set a parameter by using a String (for example, call the setString() method), the Type 4 driver uses the key’s
value when generating the internal representation of the String (where that key corresponds to the character set of the column).
The character-set parameter to the String getBytes method is the Java Canonical name that corresponds to the column’s
character set.
For example, the following SQL create table statement creates a table that has an ISO88591 column:
create table t1 (c1 char(20) character set ISO88591);
> java –DISO88591=SJIS test1.java
The following method invocation sets column one of stmt to the String “abcd” where “abcd” is encoded as SJIS. The charset
parameter to the String getBytes method is SJIS
stmt.setString(1, “abcd”);
Controlling What Happens on an Exception
You can use the translationVerification property to explicitly define the behavior of the driver if the driver cannot
translate all or part of an SQL parameter. The value portion of the property can be TRUE or FALSE. (The default value is
FALSE).
If the translationVerification property’s value is FALSE and the driver cannot translate all or part of an SQL
statement, the translation is unspecified. In most cases, the characters that are untranslatable are encoded as ISO88591
single-byte question marks (‘?’ or 0x3F). No exception or warning is thrown.
If the translationVerification property’s value is TRUE and the driver cannot translate all or part of an SQL
statement, the driver throws an SQLException with the following text:
Translation of parameter to {0} failed. Cause: {1}
... Este manual também é adequado para os modelos :
Computadores - HP Integrity NonStop J-Series (365.28 kb)