代码如下:oraquery1.First;
for i := 0 to oraquery1.RecordCount - 1 do
begin
with oraquery2 do
begin
try
close;
sql.Clear;
sql.Text := 'update smspresend set dstsndsts = :V1 where dstseq = :V2';
params.ParamByName('V1').Value := '0';
params.ParamByName('V2').Value := oraquery1.fieldbyname('dstseq').Value;
execsql;
except
On E:Exception do
begin
memo1.Lines.Add('更改短信数据状态出现错误,错误消息;' + E.Message);
Exit;
end;
end;
end;
oraquery1.Next;
end;这段代码在oracle8i中执行没问题,在oracle9i中,则状态无法修改,sql语句提交后,数据库表被锁定了,只有程序退出后,状态才改过来。这是为什么呢?
for i := 0 to oraquery1.RecordCount - 1 do
begin
with oraquery2 do
begin
try
close;
sql.Clear;
sql.Text := 'update smspresend set dstsndsts = :V1 where dstseq = :V2';
params.ParamByName('V1').Value := '0';
params.ParamByName('V2').Value := oraquery1.fieldbyname('dstseq').Value;
execsql;
except
On E:Exception do
begin
memo1.Lines.Add('更改短信数据状态出现错误,错误消息;' + E.Message);
Exit;
end;
end;
end;
oraquery1.Next;
end;这段代码在oracle8i中执行没问题,在oracle9i中,则状态无法修改,sql语句提交后,数据库表被锁定了,只有程序退出后,状态才改过来。这是为什么呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货