procedure Ttest_yp.BitBtn2Click(Sender: TObject);
var
i:integer;
begin
adotable1.Edit;
adotable1.Last;
adotable1.Insert;
for i:=0 to test_yp.DBGrid1.FieldCount-1 do
begin
if adotable1.Fields[i].DataType = ftstring then adotable1.Fields[i].AsString:='';
if adotable1.Fields[i].DataType = ftdatetime then adotable1.Fields[i].Value:=date();
if adotable1.Fields[i].DataType = ftinteger then adotable1.Fields[i].Value:=0;
if adotable1.Fields[i].DataType = ftfloat then adotable1.Fields[i].Value:=0;
if adotable1.Fields[i].DataType = ftboolean then adotable1.Fields[i].Value:=true;
end;
adotable1.Post;
adotable1.Refresh; //刷新记录
test_yp.DBGrid1.Refresh;
test_yp.refresh;
test_yp.DBGrid1.SetFocus;
end;