Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MySQL 5.7 ODBC Error 1064
Message
From
15/09/2023 09:04:55
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
MySQL 5.7 ODBC Error 1064
Miscellaneous
Thread ID:
01687064
Message ID:
01687064
Views:
44
Hi Experts,

When I run the following query in MySQL Workbench, it works:
select a.employeeid, a.leaveid, b.datefrom, b.dateto, b.approved from lvreqhdr a inner join lvreqdtl b on a.id=b.lvreqhdrid where a.posted=1 and a.cancelled=0 and b.approved>0 
and a.employeeid='11EE2D00AAC9C336A758CCB8ADFBA6C1' and b.datefrom>='2023-01-01' and b.dateto <='2023-10-10'
But when I run the same code in a CursorAdapter, I get this error 1064. Error message is as follows:
[MySQL][ODBC] 8.0(a) Driver][mysqld-5.7.40-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' b.dateto, b.approved from lvreqhdr a inner join lvregdtl b on a.id=b.lvreqhdrid' at line 1
Any help or lead is highly appreciated.

Thanks in advance. Long live the Fox!
Reply
Map
View

Click here to load this message in the networking platform