Re: Integer fields - Mailing list pgsql-jdbc

From Roland Walter
Subject Re: Integer fields
Date
Msg-id 4152D5F0.2080203@mosaic-ag.com
Whole thread Raw
In response to Integer fields  ("Waldomiro" <wmiro@ig.com.br>)
List 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@mosaic-ag.com
|

pgsql-jdbc by date:

Previous
From: "Waldomiro"
Date:
Subject: Integer fields
Next
From: "John R Pierce"
Date:
Subject: Re: JDBC DRIVER FOR HANDHELDS