我的程序是连接外部的oracle数据库,使用的是ado中的connection和query等控件.程序运行开始没有问题,但是运行一会就会出现:project project1.exe raised exception class EOleException with message '[Oracle][ODBC][Ora]ORA-01013:用户请求取消当前的操作" 这个是为什么啊?大家能帮我解决一下吗?
j:=0; ADOQuery1.Close; ADOQuery1.SQL.Clear; ADOQuery1.SQL.Add('select id,name,sececlass,guishu from MAP_ATTRIBUTE_1 where guishu is not null order by id'); ADOQuery1.Open; ADOQuery1.First; while not ADOQuery1.eof do begin str:=ADOQuery1.Fields[0].AsString; i:=0; ADOQ_acc_upd.Close; ADOQ_acc_upd.SQL.Clear; ADOQ_acc_upd.SQL.Add('select * from ALLDATA_B60C40L50R20_MIN_MAX where fid='+#39+str+#39+' and v_direction < 180 and time_stamp between 20050613170000 and 20050613180000 order by time_stamp'); ADOQ_acc_upd.open; while not ADOQ_acc_upd.eof do begin i:=i+1; ADOQ_acc_upd.Next; end; if i<>0 then j:=j+1; ADOQ_acc_ins.Close; ADOQ_acc_ins.SQL.Clear; ADOQ_acc_ins.SQL.Add('update MAP_ATTRIBUTE_1 set gps_count='+#39+inttostr(i)+#39+' where id='+#39+str+#39+''); ADOQ_acc_ins.ExecSQL; ADOQuery1.Next; end; showmessage('共修改路段数为:'+inttostr(j)); 这些就是相关的代码了
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select id,name,sececlass,guishu from MAP_ATTRIBUTE_1 where guishu is not null order by id');
ADOQuery1.Open;
ADOQuery1.First;
while not ADOQuery1.eof do
begin
str:=ADOQuery1.Fields[0].AsString;
i:=0;
ADOQ_acc_upd.Close;
ADOQ_acc_upd.SQL.Clear;
ADOQ_acc_upd.SQL.Add('select * from ALLDATA_B60C40L50R20_MIN_MAX where fid='+#39+str+#39+' and v_direction < 180 and time_stamp between 20050613170000 and 20050613180000 order by time_stamp');
ADOQ_acc_upd.open;
while not ADOQ_acc_upd.eof do
begin
i:=i+1;
ADOQ_acc_upd.Next;
end;
if i<>0 then j:=j+1;
ADOQ_acc_ins.Close;
ADOQ_acc_ins.SQL.Clear;
ADOQ_acc_ins.SQL.Add('update MAP_ATTRIBUTE_1 set gps_count='+#39+inttostr(i)+#39+' where id='+#39+str+#39+'');
ADOQ_acc_ins.ExecSQL;
ADOQuery1.Next;
end;
showmessage('共修改路段数为:'+inttostr(j));
这些就是相关的代码了