Okay, this is REALLY weird!
I've been cracking my head against this for hours now. Ended up MANUALLY recreating that filter each time to see what was happening.
I've found that if I append the following to the end of the filter:
( INSTRING('BAY',UPPER(VPR:Description),1,1) > 0)
Then it fails, and does not return any records, HOWEVER, if I change it slightly to:
( INSTRING('BAY',UPPER(VPR:Description),1,1) <> 0)
Then it works perfectly. Just changed the '>' (greater than) to '<>' (not equals). I even put an extra field in the browse with the value 'INSTRING('BAY',UPPER(VPR:Description),1,1)' and it is returning 1, 6, 9 etc. as it should.
SO - the question is: LOGICALLY it should work because if the returned value is '1' then '>0' is the same as '<>0' ?!?! Yet changing this ONE character is the difference between the query working or failing.
Is this a Clarion or MS-SQL driver bug???
Cheers,
Devan