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
VirtualQuery - AS does not work correctly
Re: VirtualQuery - AS does not work correctly
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
Hello,
thank You for the answer. I posted a sample project to support.
Regards
Harald
thank You for the answer. I posted a sample project to support.
Regards
Harald
Re: VirtualQuery - AS does not work correctly
Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next VirtualDAC build.