IBCTable and Filters

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
SeaCay
Posts: 26
Joined: Wed 10 Jan 2007 03:03

IBCTable and Filters

Post by SeaCay » Sat 23 Jun 2007 06:16

Hi

I am filtering a table so that the only referenced data is with a date range.

The SQL filter applied to the TIBCTable.Filter property of

Code: Select all

TRANSDATE BETWEEN '2007/5/1' AND "2007/5/31' 
fails with an invalid filter message

whereas

Code: Select all

(TRANSDATE >= '2007/5/1') AND ((TRANSDATE >= '2007/5/31') 
is successful

The former statement using the BETWEEN keyword is more readable.
Can you confirm my findings and advise as to the use of the BETWEEN keyword. Would it be possible to have this fixed in an upcoming version please?

regards and thanks

SeaCay

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Sat 23 Jun 2007 08:12

We couldn't reproduce this problem. The FilterSQL method supports all conditionals valid for the WHERE clause.

I have noted that in your sample you occasionally use " instead of '
TRANSDATE BETWEEN '2007/5/1' AND "2007/5/31'
please check that you set the correct value to the IBCTable.FilterSQL property.

SeaCay
Posts: 26
Joined: Wed 10 Jan 2007 03:03

Post by SeaCay » Sat 23 Jun 2007 08:16

Sorry I thought I had removed all the typos, especially the ".

I will try to put a small demo together.

regards and thanks

SeaCay

SeaCay
Posts: 26
Joined: Wed 10 Jan 2007 03:03

Post by SeaCay » Sat 23 Jun 2007 22:39

I have eMailed an example of the problem to CR-Labs with Delphi code and a Firebird database.

I forgot to mention that you would need to change the TIBCConnection details but I am sure you have noticed that any way.

regards and thanks

SeaCay

Post Reply