Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
TDataSet.CheckBrowseMode
TDataSet
Top 


Automatically posts or cancels data changes when an application changes which record in the dataset is the active record.

procedure CheckBrowseMode;

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

·If State is dsEdit or dsInsert, CheckBrowseMode calls UpdateRecord, and then, 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 to the database when switching to a different record.
        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Nov 24, 2024