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 19A51329C70 for ; Thu, 23 Sep 2004 15:00:34 +0100 (BST) 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 29749-02 for ; Thu, 23 Sep 2004 14:00:23 +0000 (GMT) Received: from mosaic02.mosaic.de (mosaic02.mosaic.de [195.247.16.18]) by svr1.postgresql.org (Postfix) with ESMTP id 64FF3329E4B for ; Thu, 23 Sep 2004 15:00:24 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mosaic02.mosaic.de (Postfix) with ESMTP id 7F79991FD9; Thu, 23 Sep 2004 16:00:23 +0200 (CEST) Received: from mosaic02.mosaic.de ([127.0.0.1]) by localhost (mosaic02 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26287-10; Thu, 23 Sep 2004 16:00:23 +0200 (CEST) Received: by mosaic02.mosaic.de (Postfix, from userid 10) id 334FA91FD7; Thu, 23 Sep 2004 16:00:23 +0200 (CEST) Received: from [172.17.1.87] (aupc287.mosaic-ag.com [172.17.1.87]) by mailsrv.mosaic-ag.com (Postfix) with ESMTP id A679A56249; Thu, 23 Sep 2004 15:56:00 +0200 (CEST) Message-ID: <4152D5F0.2080203@mosaic-ag.com> Date: Thu, 23 Sep 2004 15:56:00 +0200 From: Roland Walter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.2) Gecko/20040803 X-Accept-Language: de-DE,de,en MIME-Version: 1.0 To: Waldomiro Cc: pgsql-jdbc@postgresql.org Subject: Re: Integer fields References: <001501c4a172$c629fa40$1001a8c0@shx.com.br> In-Reply-To: <001501c4a172$c629fa40$1001a8c0@shx.com.br> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavis at mosaic-ag.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/165 X-Sequence-Number: 11055 Waldomiro schrieb: > Hi, > > In my java application when an user leave some integers field empty, > it is saved without any digit like this --> '' > > In postgres 7.2 it is working, but in 7.4 it doesn't > > is there any set I should do on postgres 7.4? > Use the method setNull(|int parameterIndex, int sqlType) from java.sql.PreparedStatement if the field is empty. sqlType should be java.sql.Types.INTEGER, parmeterIndex the index in the PreparedStatement. -- Roland Walter MOSAIC SOFTWARE AG email: rwa@mosaic-ag.com |