pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedInteger fields
3+ messages / 3 participants
[nested] [flat]
* Integer fields
@ 2004-09-23 13:39 Waldomiro <wmiro@ig.com.br>
2004-09-23 13:56 ` Re: Integer fields Roland Walter <rwa@mosaic-ag.com>
2004-09-23 18:50 ` Re: Integer fields Kris Jurka <books@ejurka.com>
0 siblings, 2 replies; 3+ messages in thread
From: Waldomiro @ 2004-09-23 13:39 UTC (permalink / raw)
To: pgsql-jdbc
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?
Can someone help me?
Thanks
SHX INFORMÁTICA LTDA.
Waldomiro Caraiani
Desenvolvimento de Produto
+ 55 11 5581 1551
wmiro@shx.com.br
www.shx.com.br
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Integer fields
2004-09-23 13:39 Integer fields Waldomiro <wmiro@ig.com.br>
@ 2004-09-23 13:56 ` Roland Walter <rwa@mosaic-ag.com>
1 sibling, 0 replies; 3+ messages in thread
From: Roland Walter @ 2004-09-23 13:56 UTC (permalink / raw)
To: Waldomiro <wmiro@ig.com.br>; +Cc: 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
|
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Integer fields
2004-09-23 13:39 Integer fields Waldomiro <wmiro@ig.com.br>
@ 2004-09-23 18:50 ` Kris Jurka <books@ejurka.com>
1 sibling, 0 replies; 3+ messages in thread
From: Kris Jurka @ 2004-09-23 18:50 UTC (permalink / raw)
To: Waldomiro <wmiro@ig.com.br>; +Cc: pgsql-jdbc
On Thu, 23 Sep 2004, Waldomiro wrote:
> 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
In 7.2 '' was treated as 0, but starting with the 7.3 release this is
recognized as an invalid integer value. The bottom line is to fix your
code.
Kris Jurka
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-09-23 18:50 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23 13:39 Integer fields Waldomiro <wmiro@ig.com.br>
2004-09-23 13:56 ` Roland Walter <rwa@mosaic-ag.com>
2004-09-23 18:50 ` Kris Jurka <books@ejurka.com>
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