Total number of rows that will be fetched

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Lass.Mint
Posts: 13
Joined: Fri 18 Jun 2010 15:03

Total number of rows that will be fetched

Post by Lass.Mint » Fri 11 Feb 2011 11:03

Hi,
I'm wondering if it is possible to find out the total number of rows that will be fetched by a uni-directional dataset without having to use "select count(1) from ..." or using FetchAll or something else that loads all rows. I want to do some optimizations in my code when there are less than ~100 rows that will be fetched.

Thanks for any help.

Eric

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Mon 14 Feb 2011 08:58

Hello,

To get the total record count you should set the QueryRecCount option to true.
In this case the following SQL statement 'SELECT COUNT(*) FROM ...' will be called automatically.

Lass.Mint
Posts: 13
Joined: Fri 18 Jun 2010 15:03

Post by Lass.Mint » Thu 17 Feb 2011 11:09

Thanks for the hint. It was a big help.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 17 Feb 2011 11:25

Hello,

It is good to see that this problem was solved. If any other questions come up, please contact us.

Post Reply