WHERE clause is used to read limited set of records/rows from the table on the server.
FILTER is used to filter records/rows already read into the memory of the client PC (our PC)
Filter clause does not know the field names in the main table. Filters operate on the field name ALIAS used in the query.
Filters behave the same way like ADO.
We request you to kindly read the documentation again to avoid such misunderstandings and loss of time.
In your above example:
- Code: Select all Expand view RUN
oQry:SetFilter( "A6 LIKE '%" + ALLTRIM( vGets[ 1 ] ) + "%'" )
oQry:GoTop()
XBROWSER oQry
DO NOT USE REQUERY()
OR, much better to use DBF syntax. We can also use parameterized filters.
Example:
- Code: Select all Expand view RUN
oQry:SetFilter( "? $ UPPER(A6)", { Upper( AllTrim( vGets[ 1 ] ) ) } )
oQry:GoTop()
XBROWSER oQry
// later
oQry:Refilter( { "ABC" } )
oQry:GoTop()
XBROWSER oQry