BUG
IDataStatistics.Statistics and IDataStatistics.UniqueValues do not always process the cursor supplied to the DataStatistics object through IDataStatistics.Cursor. The results are not accurately computed.
The cursor, processed by the DataStatistics object, is set by IDataStatistics.Cursor. Like all cursors, it is a read-once cursor; however, both IDataStatistics.Statistics and IDataStatistics.UniqueValues iterate through the cursor. That means that if the cursor is set and then both IDataStatistics.Statistics and IDataStatistics.UniqueValues are called, the second method will not iterate through the cursor because it is already at the end.
Always set IDataStatistics.Cursor to be a new cursor that has not been iterated through, before calling either IDataStatistics.Statistics or IDataStatistics.UniqueValues.
Article ID:000004393
Get help from ArcGIS experts
Download the Esri Support App