recordcount and fetchAll=false

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
luis_augusto
Posts: 43
Joined: Fri 14 Oct 2005 13:45

recordcount and fetchAll=false

Post by luis_augusto » Thu 30 Nov 2006 19:48

why recordcount returns a wrong value when using fetchall=false on detail tables?

I have to perform a refresh everytime I need to correct it.

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Mon 04 Dec 2006 11:26

The RecordCount property indicates the actual number of records in the
DataSet. If you use FetchAll = False mode, TCustomDADataSet component may not contain all the data.
You can use TCustomDADataSet.Options.QueryRecCount property.
If TCustomDADataSet.Options.QueryRecCount equals to True, TCustomDADataSet performs an additional query to get record count for this SELECT.
So RecordCount property reflects the actual number of records.

Post Reply