Sign in Join
FPDoc Onlineexperiment

TMemDataset.InternalPost procedure

Member of TMemDatasetprotectedIn unit MemDs

Performs actions needed to post a record in the in-memory dataset.

Declaration

pascal
procedure InternalPost; override

Description

InternalPost is an overridden procedure used to perform actions needed to post a record in the in-memory dataset. InternalPost implements the virtual method defined in the ancestor class.

InternalPost ensures that the Active property contains True. An exception is raised when Active contains False. The State property must also contain a value that indicates the dataset is being edited, such as dsEdit or dsInsert. No actions are performed in the method when any other value is found in the State property.

InternalPost calls the inherited method which ensures that any required Fields have a value in the record. An exception is raised if a required field has a Null value. AutoInc-style fields are excluded from this requirement since their value cannot be assigned directly. Use the OnNewRecord event handler to assign values for ftAutoInc field types.

When State has the value dsEdit, the MDSWriteRecord method is called to write values in ActiveBuffer for the record. When State has the value dsInsert, the InternalAddRecord method is called to initialize the new record for the dataset.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.