GetWhereExpression
Provides a String comprised of all the field's search expressions. Each field's search expression is obtained based on its AllowSearch, UseInSearch and SearchMode properties. See GetWhereExpression method of the BaseField class for more information on how each field's search expression is created. Each field's search expression is separated by either AND or an OR clause depending the MoreResults property on this business object. If MoreResults is set to true then OR is used otherwise AND is used, this however can be overridden at each field level as well by setting the Field's SearchCondition property. The Recursive property on this objects and on the joined objects determine if the joined objects will also try to create their own search expressions from their joined objects to be include in this expression. This process will follow until the depth reaches maxLevel parameter value.
Parameters:
| Description | |
|---|---|
| includeTableName | If true then each field name will be have its table name prefixed. This is important and useful when creating where expression from multiple tables and more than one table may contain the same column name. |
| level | Current level in recursion. |
| maxLevels | Maximum levels of business objects to cover during recursion. |
| objectsCovered | A collection that can be used to track what business objects are already covered. |
| sqlParams | All the parameters created by this method will be added into this ArrayList. |
Returns:
| Type | |
|---|---|
| System.String |
| C# | |
|---|---|
public string GetWhereExpression( bool includeTableName, ref int level, ref int maxLevels, ref IBusinessObjectCollection objectsCovered, ref ArrayList sqlParams ) | |
Parameters
- includeTableName
- level
- maxLevels
- objectsCovered
- sqlParams
Target Platforms: .NET Framework 1.1 or .NET Framework 2.0