Browsing a Dataset
Go Up to Determining and Setting Dataset States
When an application opens a dataset, the dataset automatically enters dsBrowse
state. Browsing enables you to view records in a dataset, but you cannot edit records or insert new records. You mainly use dsBrowse
to scroll from record to record in a dataset. For more information about scrolling from record to record, see Navigating Datasets.
From dsBrowse
all other dataset states can be set. For example, calling the Insert
or Append
methods for a dataset changes its state from dsBrowse
to dsInsert
(note that other factors and dataset properties, such as CanModify
, may prevent this change). For more information about inserting and appending records in a dataset, see Modifying Dataset Data.
Two methods associated with all datasets can return a dataset to dsBrowse
state. Cancel
ends the current edit, insert, or search task, and always returns a dataset to dsBrowse
state. Post
attempts to write changes to the database, and if successful, also returns a dataset to dsBrowse
state. If Post
fails, the current state remains unchanged.
The following figure illustrates the relationship of dsBrowse
both to the other dataset modes you can set in your applications, and the methods that set those modes.