新
新手入门
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
var
x:integer;
begin
begin
table1.active:=true;
x :=1;
while x=1 do
begin
table1.append;
table1.FieldByName('bm').Asstring:=edit1.text;
table1.fieldbyname('xm').asstring:=edit2.text;
table1.fieldbyname('rq').asdatetime:=data.date;
Table1.post;
end;
if messagedlg('是否继续添加数据吗?',mtconfirmation,mbyesnocancel,0)=mryes then
continue
else
break;
end;
showmessage('谢谢指点');
end;
编译运行后出错提示为:project project1.exe raised cexeption class edbengineError whit message
'Key violation,',process stopped .Use step or Run to continue.
这是什么意思?
var
x:integer;
begin
begin
table1.active:=true;
x :=1;
while x=1 do
begin
table1.append;
table1.FieldByName('bm').Asstring:=edit1.text;
table1.fieldbyname('xm').asstring:=edit2.text;
table1.fieldbyname('rq').asdatetime:=data.date;
Table1.post;
end;
if messagedlg('是否继续添加数据吗?',mtconfirmation,mbyesnocancel,0)=mryes then
continue
else
break;
end;
showmessage('谢谢指点');
end;
编译运行后出错提示为:project project1.exe raised cexeption class edbengineError whit message
'Key violation,',process stopped .Use step or Run to continue.
这是什么意思?