From: | Holger Schulz <hst1(at)online(dot)de> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Bug extracting money value |
Date: | 2006-09-30 23:09:04 |
Message-ID: | rPIjYa0u87xbEkf7wiWlAPS3aOby2tyLTfkRCNbvOP1@akmail |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hello!
I always get an exception when I try to extract the money value I inserted this way:
insert into public."dbtypes" ("cmoney") values ('7').
Java:
Object oValue = m_resultSet.getObject(i);
Stacktrace (postgresql-8.2dev-503.jdbc3.jar):
org.postgresql.util.PSQLException: Bad value for type double : ?7,00
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toDouble(AbstractJdbc2ResultSet.java:2594)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getDouble(AbstractJdbc2ResultSet.java:1975)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.internalGetObject(AbstractJdbc2ResultSet.java:132)
at org.postgresql.jdbc3.AbstractJdbc3ResultSet.internalGetObject(AbstractJdbc3ResultSet.java:39)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getObject(AbstractJdbc2ResultSet.java:2291)
resultSet.getDouble(i); doesn't work either.
resultSet.getString(i); returns '?7,00' without exception.
Tested with:
PostgreSQL 8.1.4 on Windows 2000
JDBC driver: postgresql-8.2dev-503.jdbc3.jar AND postgresql-8.1-407.jdbc3.jar
Thanks
Holger
From | Date | Subject | |
---|---|---|---|
Next Message | Holger Schulz | 2006-10-01 10:57:17 | Bug extracting bit value |
Previous Message | Michael Paesold | 2006-09-30 22:13:21 | Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails |