[SOLVED] SQL Syntax not the same with TZQuery component interface and source code property...
Posted: 06.11.2016, 08:02
Hi,
I'm using Lazarus 1.6 with Free Pascal 3.0 and MySQL server version: 5.5.52-0+deb8u1 (Debian) for my database.
I remark that when I use graphical TZQuery component to prototype my application I can set SQL property with natural SQL syntax like :
SELECT * FROM DOCClassements WHERE idplan = :idplan
But when I set SQL property to the same TZQuery in source code I have to add a lot of [`] characters for each table and field names like :
SELECT * FROM `DOCClassements` WHERE `idplan` = :idplan
I would like to use same syntax with TZQuery component in toolbar or class in source code... So i have two questions :
1. Why this is like this ?
2. If I connect later to SQLite database, do you think SQL source code syntax will be different ? (I know it's the same with graphical TZQuery component because i already tested).
Thank you for your response.
Patrick
I'm using Lazarus 1.6 with Free Pascal 3.0 and MySQL server version: 5.5.52-0+deb8u1 (Debian) for my database.
I remark that when I use graphical TZQuery component to prototype my application I can set SQL property with natural SQL syntax like :
SELECT * FROM DOCClassements WHERE idplan = :idplan
But when I set SQL property to the same TZQuery in source code I have to add a lot of [`] characters for each table and field names like :
SELECT * FROM `DOCClassements` WHERE `idplan` = :idplan
I would like to use same syntax with TZQuery component in toolbar or class in source code... So i have two questions :
1. Why this is like this ?
2. If I connect later to SQLite database, do you think SQL source code syntax will be different ? (I know it's the same with graphical TZQuery component because i already tested).
Thank you for your response.
Patrick