> I am trying to resolve a problem using JDBC and our ODBC-compliant database
> engine. We use the compiler-defined wchar_t to store Unicode data in our
> database. Now, using ResultSet.getString(), I cannot retrieve the Unicode
> data from our database. Does getString() expect the underlying data to be
> an ASCII string?
If you're connecting the database using the jdbc-odbc-bridge
provided with Java, you need to know that this is a very old
one and you should try to find a JDBC-driver for your specific
database. Which one are you using?
Quote:> As a workaround, I use ResultSet.getCharacterStream().readline().getBytes()
> to retrieve the java.io.BufferedReader object and convert it to a Java
Sounds like you're using a JDBC-driver anyway (or does the
bridge support character-streams?). Again, what database
are you using and is wchar_t a known datatype of the database,
so that the driver is able to cope with that correctly to
create the right String-contents? If not, you will need to read
it the way you're already doing it.
How getString is implemented is dependent of the JDBC-driver.
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)
Always remember: The answer is forty-two, there can only be wrong