I am difficulty in filtering a dataTable with muiltiple FK relationships.

I have a table tblContacts(name, cityID, companyID) which has FK
relationships to 2 lookup tables tblCity and tblCompany created in the
DataSet.

When I build the DataView.rowFilter String, I use "Parent.cityName like
'San*' AND Parent.companyName like 'Uni*'", but I get an error "Additional
information: Invalid variable: Parent.cityName" at run time.

Is there a way to work around this error?

Thanks.

RE: RowFilter Expressions with multiple relationships by aconrad

aconrad
Wed May 25 19:12:50 CDT 2005

For multiple relationships - you must explicitly identify the relationship
by name. See the following for more info:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemdatadatacolumnclassexpressiontopic.asp

Andrew Conrad
Microsoft Corp