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




"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: Powered Respirator
    ... Using the Triton, I'd forgot how cedar, among other ... turning, sometimes two days). ... they produce certainly should be kept out of the eyes. ... comfortable than a cartridge filter mask as the fresh air keeps the ...
    (rec.crafts.woodturning)
  • Re: Speed poll
    ... I doubt I will be paying any attention to flat and boring. ... I filter his ... spent time making people go faster I had to pop off on that posting. ... My favorite thing about turning 50 is that when I don't feel like ...
    (rec.skiing.alpine)
  • heat pump question
    ... The fan was still turning, air was flowing. ... I cleaned the filter which was filthy. ...
    (alt.home.repair)
  • Re: Saving Almost Blown Highlights -- Help Please
    ... >the raw has all the colors in it - turning down the yellow is like ... The RAW data is basically 3 separate exposures; one with a red filter, ... and get amplified the same amount when the sensor is ...
    (rec.photo.digital.slr-systems)
  • Re: Car accident
    ... Ewan C McNab writes ... turning on a filter that other traffic would have stopped. ... what a Traffic Officer said in a forum I look at when asked who would be at fault if an accident happened when traffic from different directions was given a green light. ...
    (uk.rec.scouting)