Page 1 of 1

The fields of queries having JOINS is not being added dynamically

Posted: Fri 16 Feb 2007 15:14
by ankit srivastava
If i assign a query "Select fname from table" at run time,
i am able to access the "fname" field as query.fieldByName("fname");

But if the query is having joins, e.g.
"Select v.fname,r.lname from table1 v join table2 r"

fieldByName('v.fname') is showing error that " field v.fname not found.

Please help.

Posted: Mon 19 Feb 2007 08:27
by Jackson
Use 'fname' and 'lname' as field names instead of 'v.fname' and 'r.lname'.