TDataSetState = (dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey, dsCalcFields, dsFilter, dsNewValue, dsOldValue, dsCurValue, dsBlockRead, dsInternalCalc, dsOpening);
dsInsert: The active record is a newly inserted buffer that has not been posted. This record can be modified and then either posted or discarded.
Add:
if table1.state=dsInsert then
begin
//table处于add状态
//your other code
end;