VirtualQuery - AS does not work correctly

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
hschmid
Posts: 2
Joined: Mon 20 Mar 2006 08:16

VirtualQuery - AS does not work correctly

Post by hschmid » Mon 15 Jan 2018 16:03

Hello,
VirtualQuery does not use the AS statement in the source datasets correctly. Originally I had a TMyQuery with something like this:

SELECT id AS pid, CONCAT(firstname, lastname) AS fullname

and it worked with fullname, but not with pid in a VirtualQuery. To reproduce the behaviour I appended a simple example only with VirtualDAC:

One VirtualTable t1 with 3 fields: id, caption, fullname
One VirtualQuery q1 with SQL: SELECT t1.id AS pid FROM t1
One VirtualQuery q2 with SQL: SELECT * FROM q1

The result of the FieldList in q2 is "id" and not as expected "pid".

I would like to append a zip file to reproduce the error but found no upload link.

Kind regards
Harald

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: VirtualQuery - AS does not work correctly

Post by MaximG » Thu 18 Jan 2018 07:43

We tested VirualDAC work according to your description. Unfortunately, we did not manage to reproduce the described issue. Can you send us your test project demonstrating the issue via the e-support form ( https://www.devart.com the "Support"\"Request Support" menu)

hschmid
Posts: 2
Joined: Mon 20 Mar 2006 08:16

Re: VirtualQuery - AS does not work correctly

Post by hschmid » Sat 20 Jan 2018 16:24

Hello,
thank You for the answer. I posted a sample project to support.
Regards
Harald

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: VirtualQuery - AS does not work correctly

Post by MaximG » Mon 22 Jan 2018 11:26

Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next VirtualDAC build.

Post Reply