0

MySQL ODBC gives incomplete results after upgrading from 5.1.6 to 5.3.13 with a MySQL 5.1.73 database. Compatibility should be no issue according to the MySQL documentation.

I use Visual FoxPro 9 SP2 to query the database. With ODBC 5.1.6. I allways get the required results.

With ODBC 5.3.13 I get incomplete/incorrect results when a memo-field is (MySQL type TEXT) when using a WHERE clause, like "WHERE MYFIELD = ( ?lcDEMO ). If I am not using a variable, but use "WHERE MYFIELD = 'DEMO'" the results are OK again.

What is becoming incomplete/incorrect, are the numeric / integer fields. They all show 0, instead of the actual value.

This is the ODBC 5.3.13 connectionstring: lcDSNLess="DRIVER={MySQL ODBC 5.3 ANSI Driver};UID=root;PWD=******;Database=web;Server=localhost;PORT=3306;NO_PROMPT=1;OPTION=134217728;"

This is the ODBC 5.1.6. connection string: lcDSNLess="DRIVER={MySQL ODBC 5.1 Driver};UID=root;PWD=******;Database=web;Server=localhost;PORT=3306;NO_PROMPT=1;OPTION=134217728;"

So I run into problems with ODBC 5.3.13 when (1) the query has a WHERE clause, using a variable and (2) has a memo field (TEXT).

What can be the cause of getting zero's in the query results?

Broekhuis
  • 9
  • 2
  • Quick fix: hang on version`5.1.6`! Test former versions of`5.3.x` start with `5.3.9`as there is a memo bug in later versions. See https://bugs.mysql.com/bug.php?id=92947. To debug, turn on general query log in MySQL and Trace in ODBC-Admin. Maybe that shows what wrong. – ComputerVersteher Nov 01 '19 at 20:18
  • see https://stackoverflow.com/questions/58674295/parameterized-query-with-pyodbc-and-mysql8-returns-0-for-columns-with-int-data-t – nigelgomm Nov 05 '19 at 13:40

0 Answers0