Page 1 of 1

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

Posted: Wed 04 Jun 2008 13:17
by MagicT
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

Posted: Thu 05 Jun 2008 07:38
by Plash
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.