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.

No problem, and thanks for the clarification.

I did try the LIKE operator as in SQL statements but
I believe I tried using the percent sign as wildcard
(also as in SQL syntax). And as 'LIKE' is not
mentioned in the documentation for 'filter', not even
where partial string filtering is concerned I didn't
recognize the possibility that it was applicable
after all.

Anyway, with the deficient documentation in the
current Delphi online help there are comments
like yours that give me progress in understanding
the new features in Delphi.

I have only recently begun trying out ADO and am
most grateful for all the help I receive here. (My
experience with Delphi/Pascal as such goes back
to TP version 3 around 1985!)

regards Sven


.



Relevant Pages

  • Re: There is already an object named ... in the database
    ... I delete the table beforehand like you suggest. ... > Maybe I have to dig deeper into the way Delphi passes SQL statements onto ...
    (microsoft.public.sqlserver.programming)
  • prepared command (or instruction) S000002 not found error
    ... we are trying to migrate our Delphi 5 BDE Win32 application to ADO and Delphi 2006 with Update 2 installed. ... We are accessing a iSeries (aka AS400). ... It is really wired because some SQL Statements runs and trying the VERY SAME SQL over ODBC works great, ...
    (borland.public.delphi.database.ado)