[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'DB' (#fcl)


Activate the dataset: Fetch data into memory.


Source position: db.pas line 1712

public procedure TDataSet.Open;


Open must be used to make the TDataset Active. It does nothing if the dataset is already active. Open initializes the TDataset and brings the dataset in a browsable state:

Effectively the following happens:

  1. The BeforeOpen event is triggered.
  2. The descendents InternalOpen method is called to actually fetch data and initialize fielddefs and field instances.
  3. BOFis set to True
  4. Internal buffers are allocated and filled with data
  5. If the dataset is empty, EOF is set to true
  6. State is set to dsBrowse
  7. The AfterOpen event is triggered


If the descendent class cannot fetch the data, or the data does not match the field definitions present in the dataset, then an exception will be raised.

See also



Is the dataset open or closed.



Current operational state of the dataset



Is the cursor at the beginning of the data (on the first record)



Indicates whether the last record has been reached.



Event triggered before the dataset is opened.



Event triggered after the dataset is opened.

Documentation generated on: May 14 2021