RAD Studio VCL Reference
TDataSet.CheckBrowseMode Method

Automatically posts or cancels data changes when the active record changes.

procedure CheckBrowseMode;
__fastcall CheckBrowseMode();

CheckBrowseMode is used internally by many dataset methods to ensure that modifications to the active record are posted when a dataset's state is dsEdit, dsInsert, or dsSetKey and a method switches to a different record. 

If State is dsEdit or dsInsert, CheckBrowseMode calls UpdateRecord, and, if the Modified property for the dataset is true, calls Post. If Modified is false, CheckBrowseMode calls Cancel

If State is dsSetKey, CheckBrowseMode calls Post

If State is dsInactive, CheckBrowseMode raises an exception. 

If an application uses existing dataset methods, CheckBrowseMode is always called when necessary, so there is usually no need to call CheckBrowseMode directly. 

Applications that provide custom dataset routines may need to call CheckBrowseMode inside those routines to guarantee that changes are posted when switching to a different record. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!