Subject RE: [IBO] filter problem
Author Helen Borrie
At 08:41 AM 19-09-01 +0200, Laurent GILBERT wrote:

Laurent:

>On a form, I put :
>* A TIB_Connection component

Should be TIBODatabase

>* A TIB_Transaction component

If you need extra transactions, use TIBOTransaction. If not, omit it.

>* A TIBOQuery component with this select statement :
>SELECT CUST_NO
> , CUSTOMER
> , CONTACT_FIRST
> , CONTACT_LAST
> , COUNTRY
> , CURRENCY
> , TOTAL_VALUE
>FROM CUSTOMER
>JOIN COUNTRY ON COUNTRY.COUNTRY = CUSTOMER.COUNTRY
>LEFT JOIN SALES ON SALES.CUST_NO = CUSTOMER.CUST_NO
>* A TDataSource component.
>* A TGrid component to display data.
>* For filter 1 : A Tcheckbox and A Tedit components => '(CUSTOMER LIKE ' +
>QuotedStr(Edit1.text) + ')'

Needs to be '(CUSTOMER LIKE '+ QuotedStr('%' + Edit1.text + '%')

>* For filter 2 : A Tcheckbox => '(TOTAL_VALUE IS NOT NULL)'
>* A Tlabel component to display "filter" property
>
>When I activate separately filter 1 and filter 2 : it works.
>But when I activate filter 1 and 2 together, this error occurs in
>"TIBOInternalDataset.SysRefresh" function at "Result := inherited
>SysRefresh( Rows, Keys );" line :
> Invalid syntax: extra or missing parenthesis:
>(
>(
>CUSTOMER IS NOT NULL
>LIKE 'SIGN') <-------------------------------- LIKE '%SIGN%'
>AND
>(
>TOTAL_VALUE)
>)
>
>A new test shows that "(TOTAL_VALUE IS NOT NULL) AND (CUSTOMER LIKE 'SIGN')"
>works !!!


Still, you will need to have correct syntax for the LIKE operator.

rgds,
Helen


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________