Page 1 of 1

VirtualQuery - AS does not work correctly

Posted: Mon 15 Jan 2018 16:03
by hschmid
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

Re: VirtualQuery - AS does not work correctly

Posted: Thu 18 Jan 2018 07:43
by MaximG
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)

Re: VirtualQuery - AS does not work correctly

Posted: Sat 20 Jan 2018 16:24
by hschmid
Hello,
thank You for the answer. I posted a sample project to support.
Regards
Harald

Re: VirtualQuery - AS does not work correctly

Posted: Mon 22 Jan 2018 11:26
by MaximG
Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next VirtualDAC build.