Try replacing the ampersand character with the xml entity &

HTH,

Jon

Mark Whitby wrote:
Further to my email earlier I've discovered I can either have the truncation on or the reconnect on, but I can't include both in the url otherwise Tomcat doesn't start up. Also, if I take off the autoreconnect I get a null pointer error on my connection class.

I'm getting desperate so does anyone know how I can set the truncation to false and still have the auto reconnect on?

Mark

----- Original Message ----- From: "Mark Whitby" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, March 21, 2006 8:59 PM
Subject: Data Truncation Error


Hello all,

I am using a MySQL 5.0.18 server with the mysql-connector-java-3.1.12-bin Connector/J driver to connect to it on a Tomcat 5.5.15 server. The connection works fine but occasionally when I try to add a Java double value to the database (a row set to DECIMAL(10,2))I get the following error:

com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for column 'TotalCost' at row 1

Now I believe to solve this you have to turn data truncation off in the connection url. However, when I try

url="jdbc:mysql://localhost:3306/fyp?jdbcCompliantTruncation=false&autoReconnect=true"

Tomcat fails to start and I have to remove the truncation bit so it just reads url="jdbc:mysql://localhost:3306/fyp?autoReconnect=true" with which Tomcat does start up.

So how can I get rid of this error?

Many thanks

Mark Whitby

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to