Page 1 of 1

Update when using alias fields fails

Posted: Tue 26 Jul 2011 22:24
by lemesos
Trying to move some projects from my ancient ZEOS components to mydac but I run into problems with Alias fields.

I have this query: select Patient.ID,Patient.pFirst AS PatientNameFirst, Patient.PLast AS PatientNameLast
FROM pattable AS Patient
when I try to make changes as follows:

myquery.edit;
myquery.fieldbyname('PatientNameFirst').asString:='something';
myquery.post;

It fails with
Unknown Column PatientNameFirst in field list.
A lot of these type of queries are created in code so I can not specify the SQLUpdate or it will be very time consuming.
As I said before the old ZEOS has no problem with this. My version is 5.90
Let me know if there is a solution to this.
Thanks

Posted: Wed 27 Jul 2011 12:22
by AndreyZ
Hello,

Thank you for the information. We have reproduced the problem and the investigation of the problem is in progress. As soon as we solve the problem, we will let you know. As a workaround, you can remove alias for your table:

Code: Select all

select pattable.ID,pattable.pFirst AS PatientNameFirst, pattable.PLast AS PatientNameLast FROM pattable

Posted: Mon 05 Sep 2011 11:12
by AndreyZ
We have fixed the problem. This fix will be included in the next MyDAC version.