X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5143F56659 for ; Mon, 28 Feb 2005 12:28:39 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77305-04 for ; Mon, 28 Feb 2005 12:28:30 +0000 (GMT) Received: from mnc.ch (unknown [212.23.250.43]) by svr1.postgresql.org (Postfix) with ESMTP id 6323B5666A for ; Mon, 28 Feb 2005 12:28:28 +0000 (GMT) Received: (qmail 5594 invoked from network); 28 Feb 2005 13:28:30 +0100 Received: from 62-2-77-204.business.cablecom.ch (HELO meuh.mnc.ch) (62.2.77.204) by www.mnc.ch.com with SMTP; 28 Feb 2005 13:28:30 +0100 Received: by meuh.mnc.ch (Postfix, from userid 1000) id 4A64D23F50B; Mon, 28 Feb 2005 13:28:27 +0100 (CET) To: pgsql-jdbc@postgresql.org Subject: impossible to update rows specifying columns with NULL value? From: Guillaume Cottenceau Date: 28 Feb 2005 13:28:27 +0100 Message-ID: <87wtssj2c4.fsf@meuh.mnc.ch> Lines: 22 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.053 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/210 X-Sequence-Number: 12390 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