我的程序是连接外部的oracle数据库,使用的是ado中的connection和query等控件.程序运行开始没有问题,但是运行一会就会出现:project project1.exe raised exception class EOleException with message '[Oracle][ODBC][Ora]ORA-01013:用户请求取消当前的操作"
这个是为什么啊?大家能帮我解决一下吗?

解决方案 »

  1.   

    但是的确没有其他的信息了啊!我的这个程序还能够运行的,他运行一段时间就会提示上面的那个错误。我想第一,我的程序应该没有问题吧,要么程序是不能运行的,我的程序运行的时候修改了一个列的,每次停下来的时候,那个列还是有几个行被改过了,说明程序已经运行了,但是没有改完,说明程序在中间终止了,所以断言我的程序语句应该没有问题。第二,是不是在什么地方可以设置超时的时间啊,比如在oracle数据库上,或者是在我的ODBC中,我的程序运行的时间到了,就被打断了??大家帮我分析一下,谢谢啊!
      

  2.   

    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));
    这些就是相关的代码了