本人在编辑如下代码时报错:
procedure Tmainform.N12Click(Sender: TObject);
begin
if Adotable1.Locate('用户名称',loginform.name_edit.Text,[]) then
if adotable1.FieldByName('用户权限').AsString='123456' then
begin
addform.show;
addform.ADOTable1.Append ;
end
else
showmessage('对不起,您无权访问!');
end;
错误是:
Project project.exe raised exception class EdatabaseError with message'ADOTablel:Cannot perfprm this operation on a closed dataset' .请帮帮我解决一下吧,万分感谢,感激涕零!!!!!!
procedure Tmainform.N12Click(Sender: TObject);
begin
if Adotable1.Locate('用户名称',loginform.name_edit.Text,[]) then
if adotable1.FieldByName('用户权限').AsString='123456' then
begin
addform.show;
addform.ADOTable1.Append ;
end
else
showmessage('对不起,您无权访问!');
end;
错误是:
Project project.exe raised exception class EdatabaseError with message'ADOTablel:Cannot perfprm this operation on a closed dataset' .请帮帮我解决一下吧,万分感谢,感激涕零!!!!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货