我在进行表的数据库操作时,出现如下提示(摘取部分):raise exception class edbengineerror with message "record/key deleted";
我使用bde连接sql server 7.0数据库,使用表控件进行上述操作的;在修改纪录并保存后会出现上述提示。
请各位帮帮忙!谢谢了!
我使用bde连接sql server 7.0数据库,使用表控件进行上述操作的;在修改纪录并保存后会出现上述提示。
请各位帮帮忙!谢谢了!
if DataModule1.Tab_BxInfo.State=dsInsert then //tab_bxinfo:主表
begin
try
DataModule1.Tab_BxInfo.Post; if messagedlg('确实要保存吗?',mtconfirmation,[mbyes,mbno],0)=mryes then
begin
datamodule1.tab_bxinfo.applyupdates;//缓存更新
datamodule1.tab_bxinfo.commitupdates;//缓存更新
end;
except
showmessage('冰箱各项参数输入不正确或保存过程有异常,请检查输入或重新操作!');
exit;
end;
ComboBox1.Items.Add(DataModule1.qry_BxInfo.fieldbyname('BxModel').ASString);
ShowMessage('数据成功保存,请输入测试标准!');
for i:=5 to 44 do //tab_bxparam:从表
begin
DataModule1.Tab_BxParam.Append;
//1226DataModule1.Tab_BxParam.FieldByName('BxModel').AsString:=DataModule1.Tab_BxInfo.FieldByName('BxModel').AsString;
DataModule1.Tab_BxParam.FieldByName('BxModel').AsString:=DataModule1.qry_BxInfo.FieldByName('BxModel').AsString;
DataModule1.Tab_BxParam.FieldByName('ETemp').AsInteger:=i;
DataModule1.Tab_BxParam.Post;
end;
end
else if DataModule1.Tab_BxInfo.State=dsEdit then
begin
try
DataModule1.Tab_BxInfo.Post; if messagedlg('确实要保存吗?',mtconfirmation,[mbyes,mbno],0)=mryes then
begin
datamodule1.tab_bxinfo.applyupdates;//缓存更新
datamodule1.tab_bxinfo.commitupdates;//缓存更新
end;
except
showmessage('冰箱各项参数输入不正确或保存过程有异常,请检查输入或重新操作!');
exit;
end;
end;
DbGrid1.ReadOnly:=True;
DbGrid1.Columns[1].ReadOnly:=True;