- 论坛徽章:
- 0
|
procedure TRightManager_form.OKBtnClick(Sender: TObject);
var
I_row: integer;
begin
with query_data do
begin
close;
sql.Clear;
sql.Text := 'delete from UserRight';
try
execsql;
except
messagedlg(Errormsg0005 + '0006', mtError, [mbok], 0);
close;
self.Close;
end;
for I_row := 0 to 4 do
begin
close;
sql.Clear;
sql.Text := 'insert into UserRight(no,name,right)'
+ ' values("' + inttostr(I_row) + '","' + P_rights[0, I_row] + '","'
+ P_rights[1, I_row] + '")';
try
execsql;
except
messagedlg(Errormsg0004 + '0006', mtError, [mbok], 0);
close;
self.Close;
end;
end;
close;
self.Close;
end;
end;
运行报错!
c:\1 |
|