I'm creating a page where users can search certain fields and want to make
use of the SQL Wildcard '%'. When I type in 'text%', records are returned
beginning with 'text'. When I type '%text%', records containing 'text' are
returned. So far so good. But when I type '%text', attempting to find
records ending in 'text' I get the error message:
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
The relevant bits of code doing this are:
If Len(Request.Form("txtContactName")) <> 0 Then
strContactName = CStr(Request.Form("txtContactName"))
strCriteria = strCriteria & "ContactName LIKE '" & strContactName &
"'"
End If
objRSCompanies.Filter = strCriteria
This last line is where the error is produced.
Any ideas?
Thanks, Jim Allen.