Page 1 of 1

recordcount and fetchAll=false

Posted: Thu 30 Nov 2006 19:48
by luis_augusto
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.

Posted: Mon 04 Dec 2006 11:26
by Jackson
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.