No values can be saved in a mySQL Table with a Field called 'Left'

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MagicT
Posts: 1
Joined: Wed 04 Jun 2008 13:07

No values can be saved in a mySQL Table with a Field called 'Left'

Post by MagicT » Wed 04 Jun 2008 13:17

Hi,

I use a TUniTable (T) and mySQL. The field 'Left' is a int.

t.open;
t.append;
t.FieldbyName('Left').asInteger := 25;
t.post;

I get a errormessage telling me that there is a mistake in my SQL-Syntax at the post. When i change the name of the field to 'Left2' it works... ist 'Left' a somehow reserved word? are there more of this kind?

Regards,
Timo

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 05 Jun 2008 07:38

Yes, LEFT is the keyword in SQL. It is recommended to not use this word as a column name.

You can set QuoteNames option of TUniTable to make it work with any column names.

Post Reply