ADOQuery.Filter not working with LIKE

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.

Need Your Help

Collection_select has always only 1 item, not an array? In ruby on rails

ruby-on-rails ruby collections

I am implementing in Ruby on Rails and I am trying to work with the collection_select, I'm a newbie. I just want to do, I have a list with groups and a list with roles. These are both models. So, I...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.