HomeActive Query BuilderSet Left Join via Code

Set Left Join via Code


I am trying to find an example that show how to change a "Link" that has been added using ActiveUnionSubquery.AddLink to a "Left Join". By default it added as a "Inner Join". Can you point me in the right direction.

Thanks
Darrell | email
July 15 2009, 11:02 PM
The reference to a newly created link has the LeftType and RightType properties. You may set one or both of them to ltOuter value (default is ltInner) to define different types of outer joins.

Deplhi example:
l:=sq.AddLink(ds1, 'CustomerID', ds2, 'CustomerID');
l.LeftType:=ltOuter; // or :=ltInner
// l.RightType:=ltOuter; // or :=ltInner

C# example:
Link l = sq.AddLink(ds3, "ResellerID", ds2, "ResellerID");
l.LeftType = LinkSideType.Outer; // or Inner
// l.RightType = LinkSideType.Outer; // or Inner
Sergey Smagin | email
4 hours, 32 mins since original post
I am using the .Net version. When i set this value I get the following error:

'Set' accessor of property 'LeftType' is not accessible.
'Set' accessor of property 'RightType' is not accessible.

Here is the line of code I am using to get a Ref:

Dim r As Link = frm2.GetSetQueryBuilder.ActiveSubQuery.ActiveUnionSubquery.AddLink(parentTableName2, ll, childTableName2, cLinks(f))

r.LeftType = LinkSideType.Inner
r.RightType = LinkSideType.Outer


Thoughts?

Thanks
Darrell
Darrell | email
7 hours, 34 mins since original post
Dear Darrell,

Please download the updated build. This problem is fixed now.
Sergey Smagin | email
4 days, 6 hours since original post
This topic is closed