下面的程序为什么会出错啊?
procedure TForm1.Button1Click(Sender: TObject);
begin
ADOtable1.Open;//打开数据集
end;procedure TForm1.Button2Click(Sender: TObject);
begin
adotable1.Append;//在dbgrid里添加多行新的数据
end;procedure TForm1.Button3Click(Sender: TObject);
begin
adotable1.UpdateBatch;//使用批处理更新
if adotable1.RecordsetState= [stopen] then
showmessage('yes');
end;procedure TForm1.Button4Click(Sender: TObject);
begin
adotable1.Cancelbatch;
end;
//数据集是以缓存更新模式打开的end.面的程序为什么有时会出错