impossible to update rows specifying columns with NULL value?

Поиск
Список
Период
Сортировка
От Guillaume Cottenceau
Тема impossible to update rows specifying columns with NULL value?
Дата
Msg-id 87wtssj2c4.fsf@meuh.mnc.ch
обсуждение исходный текст
Ответы Re: impossible to update rows specifying columns with NULL  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Hi,

I have a table with a column of type `integer'. I insert data in
this column with NULL value. The NULLs should be OK in the
database since when I perform a SELECT on this row, after a
getInt on this column (value obtained is 0), ResultSet#wasNull is
true.

The problem is when trying to UPDATE (changing values of other
columns): my PreparedStatement uses "... WHERE column = ?" to
specify the NULL value for the said column, and I set the value
with "ResultSet#setNull( 4, java.sql.Types.NUMERIC )", but when
executing the statement, no change occurs (0 rows affected).

I am using postgres 7.4.5 with postgresql-8.0-310.jdbc3.jar.

Any idea?

Thank you.

--
Guillaume Cottenceau

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

Предыдущее
От: Markus Schaber
Дата:
Сообщение: Abandoning PGobject
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: impossible to update rows specifying columns with NULL