Re: Can't use '*' in TADODataset.Filter



The wildcards are different for varying RDBMS. Check your documentation to
be sure what to use.

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Arjan de Haan" <2x nospam nospam adwhaan AT hotpop.com> wrote in message
news:44eaa0db@xxxxxxxxxxxxxxxxxxxxxxxxx

"Thammarat charoenchai." <apatiu@xxxxxxxxx> wrote in message
news:44ea6e50@xxxxxxxxxxxxxxxxxxxxxxxxx
tblProduct.Filter := 'Name=''*' + edName.Text + '*''';
tblProduct.Filtered := True;

it's not work.


Not sure what you mean with 'it's not work' but I'm assuming you don't see
ANY records
after turning on the filter. That's because you are filtering on a literal
value (say
'*Jon*') instead of what I think you want: any value containing the
searched value (like
'John Jones').
Because you're using wildcards, you need to use LIKE instead of =, like
so:

tblProduct.Filter := 'Name LIKE ''*' + edName.Text + '*''';
tblProduct.Filtered := True;


Hope this helps.
Success.

...Arjan...




.



Relevant Pages

  • Re: Wildcard Question
    ... Hans-Stefan Suhle wrote: ... There's no documentation because there are no wildcards in string ...
    (comp.lang.php)
  • Re: Documentation for FileScriptingObject
    ... That's the documentation for the FileSystemObject, ... the use of wildcards: ... Raphael ... >> Is the FileScriptingObject documented anywhere? ...
    (microsoft.public.scripting.vbscript)
  • Re: Help with removing files in a dir
    ... Charles Heizer writes: ... > aware that TCL/TK did not nativly handle wildcards. ... rm doesn't "nativly handle wildcards" either (which is why the ... documentation for rm. ...
    (comp.lang.tcl)