# MTFilterItem

The DataFilter object contains MTFilterItem objects. Each Filter item comprises a single filter criteria. Multiple filter items are combined by the data filter to create composite filters.

To view an object model diagram that includes MTFilterItem, click here.

## Program ID

MTSQLRowset.MTDataFilter.1

## Methods

FilterString | Gets the filter string for use in a SQL query or ADO filter.
OperatorAsString | Sets the filter operator as a string (<,>,<>,<=,>=).

## Properties

PropertyName | The name of the filter column.
Operator | The filter operator that is being used in the filter query.
Value | The value that is being used in the filter query.

# Method Detail

## FilterString

This method gets the filter string for use in a SQL query or ADO filter.

### Visual Basic Syntax

FilterString() As String

### C++ Syntax

HRESULT FilterString([out, retval] BSTR* pFilterStr);

## OperatorAsString

This method sets the filter operator as a string (<,>,<>,<=,>=)

### Visual Basic Syntax

OperatorAsString(Operator As String)

### C++ Syntax

HRESULT OperatorAsString([in] BSTR pOperator);

# Property Detail

## PropertyName

This property specifies the name of the filter column.

### Visual Basic Syntax

Property PropertyName As String

### C++ Syntax

HRESULT PropertyName([out, retval] BSTR *pVal);

HRESULT PropertyName([in] BSTR newVal);

## Operator

This property specifies the filter operator that is being used in the filter query.

### Visual Basic Syntax

Property Operator As MTOperatorType

### C++ Syntax

HRESULT Operator([out, retval] MTOperatorType *pVal);

HRESULT Operator([in] MTOperatorType newVal);

## Value

This property specifies the value that is being used in the filter query.

### Visual Basic Syntax

Property Value As Variant

### C++ Syntax

HRESULT Value([out, retval] VARIANT *pVal);

HRESULT Value([in] VARIANT newVal);