BeforePost (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example checks for a valid entry in a TDBEdit control and calls the Abort procedure if the control is empty; Abort cancels the post before it happens.

Code

procedure TForm1.ClientDataSet1BeforePost(DataSet: TDataSet);
begin
  if DBEdit1.Text = '' then
    Abort;
  DataSet.Fields[2].AsString := DBEdit1.Text;
end;

Uses

See Also