When I try to insert a record into a database I got a SQLException
java.sql.SQLException: Unexpected token: 444.0 in statement [
The database column is defined DECimal(11,2) and the value is of type double and value 444.44
Why does the database not accept this value ?
Arni
Ann - 19 Oct 2004 23:45 GMT
> When I try to insert a record into a database I got a SQLException
>
[quoted text clipped - 5 lines]
>
> Arni
The database is using DECIMAL.
Change the database column definition to be double(11,2).
Luke Webber - 19 Oct 2004 23:56 GMT
More information required. What is the full SQL command sequence, and
what DBMS are you using? It's probably not the constant value that's at
fault here, but your SQL syntax.
Luke
> When I try to insert a record into a database I got a SQLException
>
[quoted text clipped - 5 lines]
>
> Arni
Paul Lutus - 20 Oct 2004 06:58 GMT
> When I try to insert a record into a database I got a SQLException
>
[quoted text clipped - 4 lines]
>
> Why does the database not accept this value ?
Because of a problem in the code you forgot to post?

Signature
Paul Lutus
http://www.arachnoid.com
Tor Iver Wilhelmsen - 20 Oct 2004 08:07 GMT
> java.sql.SQLException: Unexpected token: 444.0 in statement [
[...]
> Why does the database not accept this value ?
It does not get that far: The error message comes from the SQL parser.
Why didn't you post the SQL statement you tried to execute?
steph - 20 Oct 2004 09:45 GMT
which rdbms ?
what is exactely the code ?
Le 20/10/2004 00:05, Arnold Peters a écrit :
> When I try to insert a record into a database I got a SQLException
>
[quoted text clipped - 5 lines]
>
> Arni

Signature
stephane
retirez les lettres majuscules et le 666 de l'adresse pour l'utiliser.
Jørn Hansen - 20 Oct 2004 20:36 GMT
> When I try to insert a record into a database I got a SQLException
>
[quoted text clipped - 5 lines]
>
> Arni
What is your regional setup? Should it be 444,0 instead of 444.0...