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

I just make a little example with EMPLOYEE database.
On a form, I put :
* A TIB_Connection component
* A TIB_Transaction component
* 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) + ')'
* 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')
AND
(
TOTAL_VALUE)
)

A new test shows that "(TOTAL_VALUE IS NOT NULL) AND (CUSTOMER LIKE 'SIGN')"
works !!!


-----Message d'origine-----
De : Jason Wharton [mailto:jwharton@...]
Envoye : mar. 18 septembre 2001 18:33
A : IBObjects@yahoogroups.com
Objet : Re: [IBO] filter problem

For sake of saving me a little time, please put together a very simple app
that I click a button and it errors out.
I can get this fixed fairly quickly if you do this part of it.
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: <laurent.gilbert@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, September 18, 2001 6:03 AM
Subject: [IBO] filter problem


> Hi all,
>
> In my application, I use TIBOQuery component (last 3.6 version) and
> filter property.
> My window has a grid and "filter shortcuts". When user activate
> a "filter", I modify filter property of the IBOQuery.
> Filters could be combined.
>
> Filters are :
> 1) "(TNATU_EST_CABLE = 1)"
> 2) "(TNATU_REF_TECHNO = 'O')"
> 3) "(TTEQU_NOM LIKE '%SL%')"
> 4) "(TEQU_REF_DERETATEQU > 0 AND TETATEQU_REF_SITE IS NOT NULL)"
>
> Users can select filters 1 and 2, or 1, 2 and 3, etc... It works very
> well !
>
> The only problem is when filters 3 and 4 are combined !
> The filter statement I set in filter property was : "(TTEQU_NOM
> LIKE '%SL%') AND (TEQU_REF_DERETATEQU > 0 AND TETATEQU_REF_SITE IS
> NOT NULL)".
>
> This is the IBO error that occurs :
>
> Invalid syntax : extra or missing parenthesis:
> (
> TTEQU_NOM IS NOT NULL
> LIKE '%SL%'
> )
> AND
> (
> TEQU_REF_DERETATEQU > 0
> AND
> TETATEQU_REF_SITE
> )
>
> I don't know why "is not null" was moved !
>
> If someone has an idea...
>
> Laurent.
> (PS: sorry for my poor English...)






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