Skip to main content
Participant
April 11, 2008
Question

Database Error after upgrading to CF8

  • April 11, 2008
  • 1 reply
  • 278 views
Hello,
I have some applications which are running under CF MX 6.1 and MySQL 4.0. For the Database connection I use the J-Connector of MySQL.

Now I upgraded one server to CF8 and MySQL 5.0. For the database connection I use the intern connector for MySQL-Databases in the CF-Administrator.

Now I get an error in some cases: "Incorrect decimal value: '' for column 'feld' at row 1 ".

This error appears when I try to insert a value of "" in a decimal field. On my old server this works fine and MySQL automatically insert "0" in the field. Now I first thought that this is a problem of MySQL, but when I use a SQL-Tool like MySQL-Front and use the exact same query, it works. One example:

INSERT INTO tabelle(id,feld)
VALUES ("1","")

The field "feld" is a decimal field. When I use a SQL-Tool the line is inserted and the value of feld in the db is "0". When I use this query in CF8 the error "Incorrect decimal value" appears. What can I do that CF8 is running like CF6 in this case, because I don't want to change all my applications.

Thanks a lot,
Julia
This topic has been closed for replies.

1 reply

Inspiring
April 11, 2008
from mysql 5 manual:
As of MySQL 5.0.3, DECIMALand NUMERICvalues are stored in binary format.
Previously, they were stored as strings.

you now have to always provide a value to be inserted into the field.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/