[SOLVED] SQL Syntax not the same with TZQuery component interface and source code property...

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
gelinp
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 11.11.2015, 18:49

[SOLVED] SQL Syntax not the same with TZQuery component interface and source code property...

Post by gelinp »

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
Last edited by gelinp on 06.11.2016, 20:32, edited 1 time in total.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: SQL Syntax not the same with TZQuery component interface and source code property...

Post by marsupilami »

Hello Patrick,

duh - that sounds impossible. What error message do you get when you don't quote the table name and the column name in your source code?
Best regards,

Jan
gelinp
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 11.11.2015, 18:49

Re: SQL Syntax not the same with TZQuery component interface and source code property...

Post by gelinp »

Sorry, you are write § Now I can't see any else !!! May be I confused with another one error... It's better kile this, I was disappointed to add a lot of this stuff...

Thanks anyway ! And sorry again...
Post Reply