Skip to content

SetGridCacheError - cDbCJGrid

Called when a cDbCJGrid attempts to refind a record in its data source and cannot. Good for debugging

Type: Procedure

Parameters

Parameter Type Description
hoDD Handle Handle of the Data Dictionary Object (DDO)
riId RowID RowId that failed

Syntax

Procedure SetGridCacheError Handle hoDD RowID riId

Call Example

Send SetGridCacheError hoDD riId

Description

When a grid refind error is detected, the pbCacheError property is set to True. This happens at the time the read/find by RowId actually fails. The error is not handled at the point - instead the error is handled during the next idle event.

If pbCacheError is True, the method HandleCacheError is called. When called, the find failure has already occurred, its source is no longer in your call stack and it may have been called from a variety of places. The details of that error are not available at this point, which makes HandleCacheError of limited use for debugging. If you wish to see the error when it occurs, you must use SetGridCacheError. It is called immediately upon a grid refind failure.

SetGridCacheError exists for debugging purposes only. You can put a breakpoint here or you could augment this to log the error. This is called when a ReadByRowId fails and, as noted, not when the failure is actually handled (which is later inside of HandleCacheError).

Two parameters are passed, hoDD (the DDO handle) and riId (the rowId that failed). These are not needed by the method, but could be useful when debugging. Do not try to handle the error here or refind different records, etc. (look, don't touch).

This method is found in cDbCJGrid and looks like this:

Procedure SetGridCacheError Handle hoDD RowID riId
    Set pbCacheError to True
End_Procedure

If you want to see when and why a refind is failing, put a breakpoint inside of here. You can then look at the call stack to determine when and how this was called.