Data.DB.TDataSet.CheckBrowseMode

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure CheckBrowseMode;

C++

void __fastcall CheckBrowseMode(void);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.DB.pas
Data.DB.hpp
Data.DB TDataSet

Description

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

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.

See Also