Column names bug
Posted: Thu 06 Sep 2012 06:37
Hi.
In a query like this:
the last line produces an error, because column names in returned dataset are named: `id` `id5` instead of just: id id5.
The query has to contain "UNION ALL" and "ORDER BY" to reproduce this error.
In a query like this:
Code: Select all
LiteQuery1.SQL.Clear;
LiteQuery1.SQL.Add('SELECT `id`, `id5` FROM testtable WHERE `id5` = 10');
LiteQuery1.SQL.Add('UNION ALL');
LiteQuery1.SQL.Add('SELECT `id`, `id5` FROM testtable WHERE `id5` = 9');
LiteQuery1.SQL.Add('ORDER BY `id`');
LiteQuery1.Execute;
if not LiteQuery1.Eof then
LiteQuery1.FieldByName('id').AsInteger;
The query has to contain "UNION ALL" and "ORDER BY" to reproduce this error.