Subject | RE: [IBO] filter problem |
---|---|
Author | Helen Borrie |
Post date | 2001-09-19T08:10:02Z |
At 08:41 AM 19-09-01 +0200, Laurent GILBERT wrote:
Laurent:
rgds,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
Laurent:
>On a form, I put :Should be TIBODatabase
>* A TIB_Connection component
>* A TIB_Transaction componentIf you need extra transactions, use TIBOTransaction. If not, omit it.
>* A TIBOQuery component with this select statement :Needs to be '(CUSTOMER LIKE '+ QuotedStr('%' + Edit1.text + '%')
>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) + ')'
>* For filter 2 : A Tcheckbox => '(TOTAL_VALUE IS NOT NULL)'Still, you will need to have correct syntax for the LIKE operator.
>* 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 !!!
rgds,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________