Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxServerModeCustomDataSource.IsConsistentCache Method

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

#Declaration

Delphi
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