SqlWhereClause Property
Gets or sets a value specifying an SQL clause to do property searches.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Property SqlWhereClause As String
'Usage
Dim instance As CatalogSearch
Dim value As String
value = instance.SqlWhereClause
instance.SqlWhereClause = value
public string SqlWhereClause { get; set; }
public:
property String^ SqlWhereClause {
String^ get ();
void set (String^ value);
}
public function get SqlWhereClause () : String
public function set SqlWhereClause (value : String)
Property Value
Type: System..::.String
A System.String that contains the SQL Where clause used for the search.
Exceptions
Exception | Condition |
---|---|
ValidationException | The value is invalid. |
Remarks
Where clause for a search. You can set this property to a TSQl where clause which can be used to perform property searches on the specified catalogs. All the properties in the search condition should be enclosed in []. Any string values in the search clause should be prefixed with N to allow searching for Unicode content. You can use valid T-SQL operators like AND, OR, NOT, LIKE etc in the search condition. For example string searchClause = @"\[DefinitionName\] = N'MyDefinition' AND \[Product Color\] IN (N'red',N'blue')"; You cannot have the following in the search clause:
The ( and ) should be symmetric.
The search clause cannot contain SQL comment characters /* and -- unless these characters are enclosed by [].
If the UseAdvanceFreeTextSearch property is set to true, then SQLFreeText clause will be used in the search.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.