with ds do
begin
if isAdd = true then
begin
Append;
self.BitBtn_del.Visible := false;
end
else
begin
self.BitBtn_del.Visible := true;
Edit;
end;
//很简单的代码,但运行到append 就出现CLRMODEL.BPL地址错,但关掉整个窗台再进去又好了,总之就是有时出现有时不出现.我在之前加上
if not ds.Active then
ds.Active :=true;
ds.CancelUpdates;
// if ds.State=TDataSetState.dsInsert then
// ds.Post;
// if ds.State=TDataSetState.dsEdit then
// ds.Post; 这些都试了也没有用