Subject RE: [IBO] filter problem
Author Laurent GILBERT
Hi Helen,

It's not the problem.

This is only a simple example done in ten minutes to show the error that
occurs in my application to Jason. For that, I used standard EMPLOYEE.GDB
database.

I know how to use "LIKE"..... Wildcards are entered from editbox. I tried
without wildcards and I've the same problem.

In some cases, IBO moves the "IS NOT NULL" and inserts it in a wrong place
!!!! That's my only problem.....

Regards,
Laurent.
-----Message d'origine-----
De : Helen Borrie [mailto:helebor@...]
Envoyé : mer. 19 septembre 2001 10:10
À : IBObjects@yahoogroups.com
Objet : RE: [IBO] filter problem

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
_______________________________________________________



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/