I think there's a bug in TD 5.2 with a connection to a MySQL database (though ODBC) when inserting or updating one of two MEDIUMTEXT (or TEXT) cols with null or empty string.
When inserting only one empty long string to one field ==> no problem
Code: Select all
Set lsTestNull = ''
Set lsTest = 'data'
Call SqlPrepareAndExecute( lhSql, "INSERT INTO table (col1) VALUES (:lsTestNull)" )
Code: Select all
Call SqlPrepareAndExecute( lhSql, "INSERT INTO table (col1,col2) VALUES (:lsTest,:lsTest)" )
Code: Select all
Call SqlPrepareAndExecute( lhSql, "INSERT INTO table (col1,col2) VALUES (:lsTest,:lsTestNull)" )
So I see with TD 5.1 SP6 that empty strings ('') were sent to MySQL as it is. But with TD 5.2, empty strings are sent with NULL value.
I have logged the odbc trace with TD 5.1 SP6 and TD 5.2.
You can test it with the sample I have uploaded.
I have already cooperated with Chris Anderson to make the MySQL ODBC router working with TD 5.1 SP6.
So, it would be great if you tell me if there's an option to activate with TD 5.2 to avoid this problem before you can correct the bug in the SP1...
It is very urgent for us to find a solution avoiding to explode all of our queries with mediumtext cols to one update per query !
Thanks,
Olvin