HomeActive Query BuilderHow to make where clause invisible

How to make where clause invisible


Hey

I am testing your latest component in VB.NET 2010
I have to add a fixed criteria to the Where Clause. - I am doing the following code:
Dim [select] As SQLSubQuerySelectExpression = FindFirstSelect(QueryBuilder1.ResultQueryAST)
Dim AddKundenstammCriteria As Boolean = False

For Each Table In [select].UsedDatabaseObjects.Items
If Table.Name.ToString.Contains("kundenstamm") Then
AddKundenstammCriteria = True
End If
Next
If AddKundenstammCriteria = True Then
Dim KuQ As UnionSubQuery = QueryBuilder1.ActiveSubQuery.ActiveUnionSubquery
KuQ.CriteriaList(0).ExpressionString = "kundenstamm.geloescht"
KuQ.CriteriaList(0).ConditionStrings(0) = "=0"
KuQ.CriteriaList(0).Select = False
End If

This code works really perfect. - With one little thing I can't get working.
How can I prevent the added criteria to be visible in the columns pane?

THX
Harald Bacik | email
November 26 2010, 10:29 AM
It is not possible to hide the criteria if it presents in the query. You may add it right before the execution to make it invisible for the end user. Have a look at the Query Modification sample project for detail.
Sergey Smagin | email
1 day, 18 hours since original post
This topic is closed