How to get the recordcount?

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alexhaifa
Posts: 18
Joined: Thu 29 May 2014 12:48

How to get the recordcount?

Post by alexhaifa » Tue 05 May 2015 14:56

Hello,

When I use the code this way:

IBCquery.RecordCount

It always return me the 25 registers.

How to get all the recordCount correctly?

Thanks

marcodor
Posts: 29
Joined: Tue 29 Oct 2013 20:30

Re: How to get the recordcount?

Post by marcodor » Tue 05 May 2015 15:37

So, you have 2 options here:

One is to call Query.FetchAll before RecordCount.

Better one (for large datasets) is to set Options.QueryRecCount to True and fill appropriate SQLRecCount property to retrieve count, like: select count (*) from bla bla

alexhaifa
Posts: 18
Joined: Thu 29 May 2014 12:48

Re: How to get the recordcount?

Post by alexhaifa » Tue 05 May 2015 18:31

Thanks very much

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: How to get the recordcount?

Post by ViktorV » Wed 06 May 2015 07:26

alexhaifa wrote:Hello,

When I use the code this way:

IBCquery.RecordCount

It always return me the 25 registers.

How to get all the recordCount correctly?

Thanks
The similar question has already been discussed on our forum.
Follow the link http://forums.devart.com/viewtopic.php?f=24&t=30459 for details.

Post Reply