Howto get accurate TIBCQuery.RecordCount when Filtered=True?

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jcrouch
Posts: 2
Joined: Wed 23 Sep 2009 20:27

Howto get accurate TIBCQuery.RecordCount when Filtered=True?

Post by jcrouch » Wed 23 Sep 2009 20:31

Hi, I have applied a Filter 'active_state=1' and turned Filter on. When I access the RecordCount property, the value returned is the count of all records (i.e. non filtered). How can I get the equivalent of the Filtered Record Count?
Thanks

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 24 Sep 2009 07:34

The RecordCount property returns the correct record count in the following cases:

a) the QueryRecCount option is set to False;

b) if QueryRecCount = True, you will get the correct value after all records will be fetched.

jcrouch
Posts: 2
Joined: Wed 23 Sep 2009 20:27

Post by jcrouch » Mon 28 Sep 2009 21:37

Hi again,

I appreciate your answer, however I don't believe you understood my question. The RecordCount property IS NOT RETURNING THE CORRECT RECORD COUNT WHEN A FILTER IS APPLIED.

For kicks I have made sure QueryRecCount was set to False (it is)... but this really should have nothing to do with the issue.

I don't know how to repeat this question any different or I would for clarification... "How can I get the equivalent of the Filtered Record Count?"

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 29 Sep 2009 07:47

If QueryRecCount = False, the RecordCount property returns the count of records that match the filter. We could not reproduce the problem. Please send to support*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.

Post Reply