HomeActive Query BuilderChange Join type programatically.

Change Join type programatically.


Hi,

I'm trycking to change a join between to tables from "inner join" to "left outer join" but nothing seems to happen. This is my code:

Dim l As ActiveDatabaseSoftware.ActiveQueryBuilder.Link
l = sq.AddLink(dsSet.Item(NewColumn.Table1), NewColumn.Column1, dsSet.Item(NewColumn.Table2), NewColumn.Column2)
l.LeftType = LinkSideType.Outer
sq.NotifySQLUpdatedRecursive()

The join still is a ordinary "inner join".
Sebastian | email
August 10 2010, 08:10 AM
Dear Sebastian,

We created a simple demo:

queryBuilder.SQL = "select * from table1, table2";
DataSource d1 = (DataSource)queryBulder.ActiveSubQuery.ActiveUnionSubquery.FromClause.Items[0];
DataSource d2 = (DataSource)queryBulder.ActiveSubQuery.ActiveUnionSubquery.FromClause.Items[1];
// add link and change it's type
Link l = _graphQueryBulder.ActiveSubQuery.ActiveUnionSubquery.AddLink(d1,"qwe",d2,"qwe2");
l.LeftType = LinkSideType.Outer;

After that we had the "SELECT * FROM table1 LEFT JOIN table2 ON table1.qwe = table2.qwe2" query in the queryBuilder.SQL property.

Possibly your component's version is a little bit old?
Sergey Smagin | email
2 days, 20 hours since original post
Also please check that you did not use ANSI SQL/89 syntax provider
Sergey Smagin | email
2 days, 20 hours since original post
This topic is closed