BeforePost (Delphi)
Contents
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
- Data.DB.TDataSet.BeforePost ( fr | de | ja )
- System.SysUtils.Abort ( fr | de | ja )