Column names bug

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 8
Joined: Mon 20 Aug 2012 11:36
Location: Poland

Column names bug

Post by TomekC » Thu 06 Sep 2012 06:37

In a query like this:

Code: Select all

  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`');
  if not LiteQuery1.Eof then
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.

Devart Team
Posts: 236
Joined: Thu 05 Apr 2012 07:32

Re: Column names bug

Post by ZEuS » Thu 06 Sep 2012 11:49

It seems that the problem is due to specificity of SQLite, not to LiteDAC.
We have reproduced the same result when executing the SQL-statement with UNION ALL and ORDER BY with several third-party database utilities.
For now, please try to avoid using such SQL-statements.

Post Reply