Bug #68188 Update syntax error generated when using bit(1) boolean column from Access
Submitted: 26 Jan 2013 19:46 Modified: 6 Feb 2013 12:21
Reporter: Eduardo Jiménez Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:5.2.3 OS:Windows
Assigned to: Bogdan Degtyariov CPU Architecture:Any

[26 Jan 2013 19:46] Eduardo Jiménez
Description:
Using Windows 7 64bit and MySQL 5.5.29 64bit and MyODBC 5.2.3 32bit, when I try a DAO update to a recordset with bit field set to TRUE, a SQL syntax error is issued by the driver.

Looking at the myodbc.sql log I see and update 'table' set 'bitfield'= where... limit 1;

Please notice that the bitfield has no value assigned and thus the syntax error.

How to repeat:
CREATE TABLE `Invoices` (
  `Invoice` int(11) NOT NULL,
  `InUse` bit(1) NOT NULL DEFAULT b'0',
  `PGTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`Invoice`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

from VBA open connection and recordset using ADO to that table and ...

Rst.Seek [some existing key], adSeekFirstEQ
rst!InUse=true
rst.update (this is where the error shows)
[26 Jan 2013 19:50] Eduardo Jiménez
In my post I stated using DAO, this is wrong, I actually use ADO with DSN

Just to clarify
[31 Jan 2013 11:09] Bogdan Degtyariov
What are CursorLocation, CursorType and LockType in the recordSet you are using?
Thanks.
[6 Feb 2013 12:21] Bogdan Degtyariov
The bug# 68243 causes the syntax error as described.
Since all fixes were done for 68243 I am marking the current report as 
duplicate.