The fields of queries having JOINS is not being added dynamically

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ankit srivastava
Posts: 1
Joined: Fri 16 Feb 2007 13:15
Contact:

The fields of queries having JOINS is not being added dynamically

Post by ankit srivastava » Fri 16 Feb 2007 15:14

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.

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Mon 19 Feb 2007 08:27

Use 'fname' and 'lname' as field names instead of 'v.fname' and 'r.lname'.

Post Reply