操作在同一界面,通过存储过程向数据库中写数据:
第一次:按"新增",然后"保存",操作成功.
第二次:按"新增",然后"保存",出错,
如下:
Project MDIAPP.exe raised exception class EAccessViolation with message'Access violation at address 4DE433E4 in module''sqloledb.dll'.Read of address 00000018'.Process stopped.Use Step or Run to continue.保存调用的程序如下:
with InUpBus_Info do
begin
try
begin
Parameters.Refresh;
Parameters.ParamByName('@Bs_no').Value := Trim(Bs_no.Text);
Parameters.ParamByName('@Bs_runtype').Value := Trim(Bs_runtype.Text);
Parameters.ParamByName('@Bs_iscomhost').Value := Trim(Bs_iscomhost.Text);
Parameters.ParamByName('@Bs_phone').Value := Trim(Bs_phone.Text);
Parameters.ParamByName('@Bs_memo').Value := Trim(Bs_memo.Text);
Parameters.ParamByName('@op_name').Value := 'M';
Parameters.ParamByName('@op_date').Value := now;
Parameters.ParamByName('@ActionCD').Value := ActionCD;
Prepared := true;
ExecProc;(第二次按保存时,运行到此,就出现上面的错误!!!)
end;
except
on e:Exception do
showmessage(e.Message);
end;
end;
第一次:按"新增",然后"保存",操作成功.
第二次:按"新增",然后"保存",出错,
如下:
Project MDIAPP.exe raised exception class EAccessViolation with message'Access violation at address 4DE433E4 in module''sqloledb.dll'.Read of address 00000018'.Process stopped.Use Step or Run to continue.保存调用的程序如下:
with InUpBus_Info do
begin
try
begin
Parameters.Refresh;
Parameters.ParamByName('@Bs_no').Value := Trim(Bs_no.Text);
Parameters.ParamByName('@Bs_runtype').Value := Trim(Bs_runtype.Text);
Parameters.ParamByName('@Bs_iscomhost').Value := Trim(Bs_iscomhost.Text);
Parameters.ParamByName('@Bs_phone').Value := Trim(Bs_phone.Text);
Parameters.ParamByName('@Bs_memo').Value := Trim(Bs_memo.Text);
Parameters.ParamByName('@op_name').Value := 'M';
Parameters.ParamByName('@op_date').Value := now;
Parameters.ParamByName('@ActionCD').Value := ActionCD;
Prepared := true;
ExecProc;(第二次按保存时,运行到此,就出现上面的错误!!!)
end;
except
on e:Exception do
showmessage(e.Message);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货