SQL CHAR type using setByte()

Поиск
Список
Период
Сортировка
От David Wall
Тема SQL CHAR type using setByte()
Дата
Msg-id 006701c0ac08$bfdb25a0$5a2b7ad8@expertrade.com
обсуждение исходный текст
Список pgsql-jdbc
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 String and then the first byte from the string was stored in the database.  I'm using 7.1.1beta4.
 
Does this make any sense?  Am I using the wrong SQL type or the wrong JDBC PreparedStatement set call?
 
Thanks,
David

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "David Wall"
Дата:
Сообщение: Re: serialized objects and JDBC driver
Следующее
От: "David Wall"
Дата:
Сообщение: Re: SQL CHAR type using setByte()