Subject Re: [Firebird-Java] Re: getParameterMetaData
Author Nickolay Samofatov
Hello, Roman,

>> 2. sqlsubtype is charset ID for CHAR/VARCHAR column.

> Is this documented somewhere? ;)

Yep. In source. ;)
And all this is unlikely to change in current version of XSQLDA.

Bits 0-7 of sqlsubtype is charset_id (127 is a special value -
current attachment charset).
Bits 8-17 hold collation_id for this value.

BTW, it is not entirely correct to hard-code charset sizes in driver.
It would be better to read them from RDB$CHARACTER_SETS when needed.
It looks like user-defined multi-byte character sets (such as
UTF16BE/UTF16LE created by Peter recently) may cause some problems
with driver. But I do not think this is really important issue. If
somebody wants to use user-defined charsets in database he is expected
to fix up driver appropriately, right ? :)

> Roman

--
Nickolay Samofatov mailto:skidder@...