I have a query in ADOQuery2. Now I want have a filter for that so:
ADOQuery2.Filter := 'where Fname like ' + QuotedStr(Txt_Search.Text + '*');
ADOQuery2.Filtered := true;
but it throws this exception: (*
in like statement is for Access instead of %
)
any idea?
When using the LIKE operator from within Access itself the asterisk *
is the correct wildcard character, but for ADO connections from other applications (like yours) you should actually be using the "standard" percent %
wildcard character for SQL.