Re: Integer fields

From: Roland Walter <rwa(at)mosaic-ag(dot)com>
To: Waldomiro <wmiro(at)ig(dot)com(dot)br>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Integer fields
Date: 2004-09-23 13:56:00
Message-ID: 4152D5F0.2080203@mosaic-ag.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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(at)mosaic-ag(dot)com
|

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message John R Pierce 2004-09-23 16:15:42 Re: JDBC DRIVER FOR HANDHELDS
Previous Message Waldomiro 2004-09-23 13:39:38 Integer fields