Skip to main content

TdxServerModeCustomDataSource.IsConsistentCache Method

Indicates if the data source’s internal cache is consistent with the connected database.

Declaration

function IsConsistentCache: Boolean;

Returns

Type
Boolean

Remarks

The internal cache is considered consistent with the connected database when the cached key information on the database matches its data structure. Once the internal cache becomes inconsistent, the data source stops fetching cell and group values and calculating summaries and returns Null values instead, which may cause incorrect results in a bound data control.

The IsConsistentCache function returns True if the internal cache is consistent. Otherwise, the function returns False and the OnInconsistentCache event is raised, enabling you to recover the consistency. If this event is not handled, the data source makes three attempts to recover the consistency. If all the attempts fail, the data source is closed and the OnFatalError event is raised.

Note

Certain data controller operations may trigger automatic data fetches that make the internal cache inconsistent. We recommend that you call the IsConsistentCache function to check if this is the case, and recover the consistency prior to obtaining and using the operation results.

See Also