[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Post pending edits to the database.
Source position: db.pas line 1708
public procedure TDataSet.Post; virtual; |
Post attempts to save pending edits when the dataset is in one of the edit modes: that is, after a Insert, Append or TDataset.Edit operation. The changes will be committed to memory - and usually immediately to the underlying database as well. Prior to saving the data to memory, it will check some constraints: in TDataset, the presence of a value for all required fields is checked. if for a required field no value is present, an exception will be raised. A call to Post results in the triggering of the BeforePost, AfterPost events. After the call to Past, the State of the dataset is again dsBrowse, i.e. the dataset is again in browse mode.
Invoking the post method when the dataset is not in one of the editing modes (dsEditModes) will result in an EdatabaseError exception. If an exception occurs during the save operation, the OnPostError event is triggered to handle the error.
|
Insert a new record at the current position. |
|
|
Append a new record to the data |
|
|
Set the dataset in editing mode. |
|
|
Event triggered when a post operation fails. |
|
|
Event called before changes are posted to the underlying database |
|
|
Event called after changes have been posted to the underlying database |
|
|
Current operational state of the dataset |