Accessing Join fields
Posted: 07.07.2006, 17:35
greetings,
I am running Delphi 6 with Zeoslib 6.1.5-stable and Mysql.
I have a TZQuery component on my form and have added SQL code
to the SQL property of the TZQuery component.
Normally I reference a field by using someting like:
MyQuery.fieldbyname('name').asstring
Well, I gone and used a join in my SQL code and don't know how to
reference a field ?
ie, select dealer.dnum, dealer.name,mixtemp.name from dealer left join
mixtemp on dealer.dnum = mixtemp.dnum
can't reference fields like
MyQuery.fieldbyname('dealer.dnum').asstring
as that gives a big error.
How do you do it ?
thanks,
D
I am running Delphi 6 with Zeoslib 6.1.5-stable and Mysql.
I have a TZQuery component on my form and have added SQL code
to the SQL property of the TZQuery component.
Normally I reference a field by using someting like:
MyQuery.fieldbyname('name').asstring
Well, I gone and used a join in my SQL code and don't know how to
reference a field ?
ie, select dealer.dnum, dealer.name,mixtemp.name from dealer left join
mixtemp on dealer.dnum = mixtemp.dnum
can't reference fields like
MyQuery.fieldbyname('dealer.dnum').asstring
as that gives a big error.
How do you do it ?
thanks,
D