Linx Main Linx Help

MySql Ansi ODBC driver fails under certain conditions

Use the MySql Unicode driver when using 64bit Odbc. The Ansi driver fails under certain conditions.

To replicate the issue

Create an ExecuteSql function that uses 64bit Odbc to target MySql. Execute an insert query that contains a string parameter followed by a decimal parameter. It fails with no error message.

This fails
insert into `NameValues` (`Name`, `Value`) values (@{String1},@{Decimal1})

but these work
insert into `NameValues` (`Name`, `Value`) values (@{String1},@{Decimal1.ToString()})
insert into `NameValues` (`Name`, `Value`) values (@{Decimal1},@{String1})
insert into `NameValues` (`Name`, `Value`) values ("abc",@{Decimal1})

We tracked the problem down to the conversions the Ansi driver does when it makes the call to the database.

Use the Unicode driver.