Re: TADODataset.Filter?




"Bill Dekleris" <quasar@xxxxxx> wrote in message
news:453a4e00@xxxxxxxxxxxxxxxxxxxxxxxxx
Oops! I forgot to quote the search string! The correct syntax would be:

// name starts from "bi"
ADOQuery1.Filter := 'name Like ' + QuotedStr('bi*');

// name contains "bi"
ADOQuery1.Filter := 'name Like ' + QuotedStr('*bi*');

Sorry for the error!

Bill.


I tried this tonight and got a most surprising result:

No error message and no filtering?

I single-stepped the application and could see that
ADODataset1 was "loaded" with a separate SQL SELECT
statement. Then whenever I changed the filter mask
(in an edit box) I could see that the following statements
were executed

1: ADODataset1.Filtered := false;
(typically) 2: ADODataset1.Filter := 'name LIKE ' + QuotedStr('bi*');
3: ADODataset1.Filtered := true;

but the DBGrid display did not change, it still displayed
the entire dataset?

Now I am lost? (It is 2:15 AM here and I am going to bed.)

regards Sven



.



Relevant Pages

  • Re: Problem using command.parameters
    ... I changed the command text to the following and it works great but I'm not ... getting the results I need because I'm not filtering out values that already ... database if they do not already exist in the sqlce database. ... I don't have any idea why I'm getting the error message ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Is stealth redundant?
    ... >> filtering that particular host or network. ... What's the response if a scanner scans an IP that's not in use? ... "no route to host" from the router closest to the IP address in question. ... no error message, but rather leaves that to your computer. ...
    (comp.security.firewalls)
  • Re: Error when entering sender filter addresses
    ... IMHO Sender Filtering is not the most effective way to ... implement spam prevention as much of the spam you receive is never from the ... Yesterday I started receiving an error message when adding email adresses ...
    (microsoft.public.exchange.admin)