pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roland Walter <rwa@mosaic-ag.com>
To: Waldomiro <wmiro@ig.com.br>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Integer fields
Date: Thu, 23 Sep 2004 15:56:00 +0200
Message-ID: <4152D5F0.2080203@mosaic-ag.com> (raw)
In-Reply-To: <001501c4a172$c629fa40$1001a8c0@shx.com.br>
References: <001501c4a172$c629fa40$1001a8c0@shx.com.br>

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
|



view thread (3+ messages)  latest in thread

Message-ID: <4152D5F0.2080203@mosaic-ag.com>
Permalink:  ../4152D5F0.2080203@mosaic-ag.com/
Also on:    postgresql.org/message-id/4152D5F0.2080203@mosaic-ag.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: rwa@mosaic-ag.com, wmiro@ig.com.br
  Subject: Re: Integer fields
  In-Reply-To: <4152D5F0.2080203@mosaic-ag.com>
  References: <001501c4a172$c629fa40$1001a8c0@shx.com.br> <4152D5F0.2080203@mosaic-ag.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox