[Overview][Classes][Procedures and functions][Index] Reference for unit 'DBActns' (#lcl)

TDataSetInsert

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TDataSetInsert inserts (appends) a new record into the DataSet.

Declaration

Source position: dbactns.pp line 112

type TDataSetInsert = class(TDataSetAction)

public

  procedure ExecuteTarget(); override;

  

Retrieves the dataset for the target datasource and calls its Insert method.

  procedure UpdateTarget(); override;

  

Enables or disables the action based on the state of the dataset in the target.

published

  property DataSource: TDataSource;

  

DataSource with the dataset for the action.

end;

Inheritance

TDataSetInsert

  

TDataSetInsert inserts (appends) a new record into the DataSet.

|

TDataSetAction

  

TDataSetAction is the base class for all other standard TDataSet actions.

|

TAction

  

TAction is the basic action object used in the LCL.

|

TCustomAction

  

TCustomAction is the ancestor class for TAction.

|

TContainedAction

  

Implements an Action class which has a category and parent action list.

|

TBasicAction

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TDataSetInsert is a TDataSetAction descendant which inserts a new record into the dataset for the target DataSource. The new record has blank values in each of its fields, and allows editing of the field values.

Positioning of the inserted record is actually determined using the facilities for the underlying database engine. In most cases, the record is simply appended to its data store and ordered using the indexing facilities for the database engine. Some database engines require an additional step to make the record insertion and/or field editing permanent; i.e. SQL databases require use of a COMMIT statement to flush the changes to the database engine.

TDataSetInsert calls the Insert method for the target dataset to perform the database action.

See also

TDataSetFirst

  

TDataSetFirst moves to first record in the DataSet.

TDataSetLast

  

TDataSetLast moves to last record in the DataSet.

TDataSetNext

  

TDataSetNext moves to next record in the DataSet.

TDataSetPrior

  

TDataSetPrior moves to previous record in the DataSet.

TDataSetRefresh

  

TDataSetRefresh refreshes the DataSet.

TDataSetCancel

  

TDataSetCancel cancels the current edit mode for a DataSet.

TDataSetDelete

  

TDataSetDelete deletes the current record in the DataSet.

TDataSetEdit

  

TDataSetEdit edits the current record in the DataSet.

TDataSetPost

  

TDataSetPost posts changes for the current record to the DataSet.

TDataSetAction

  

TDataSetAction is the base class for all other standard TDataSet actions.


Version 3.2 Generated 2024-02-25 Home