executeBatch problem

Andreas Schlicker <[email protected]>
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
Hi all,

I have a table with three integer and one double values. I use 
PreparedStatement.addBatch and PreparedStatement.executeBatch for adding data to 
the table. If I run the program I get a

java.sql.BatchUpdateException: Data truncation: Out of range value adjusted for 
column 'similarity' at row 1

which refers to the double column. However, if I use 
PreparedStatement.executeUpdate instead of the batched statement, everything 
goes smoothly without an error.

My system: Linux, java version "1.5.0_07", Connector/J version 5.0.3, MySQL 
version 5.0.4

Does anybody have an idea why batched statements don't work while simple updates 
do? Is there a way to retrieve the value that was out of range?

Kind regards,
Andreas

-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.