Re: [JDBC] SQL CHAR type using setByte()

2001-03-13 Thread David Wall
A quick review of the JDBC code shows that in fact everything that you pass into the driver is converted to a String first. Since Java char fields are 16 bit unicode characters, how does one go about using the SQL type CHAR(1), which by default is only one byte (there is no call setChar() in JDBC

[JDBC] SQL CHAR type using setByte()

2001-03-13 Thread David Wall
I have a Java byte field that I'm trying to store in the database.  It has a value of (byte)'0' which is a binary 48.   When I use preparedStatement.setByte() with that value, to store in a Postgresql CHAR field, it only stores a '4'.  It's as if the binary 48 were being converted to a Strin