我使用的是动态生成的存储过程控件,但是我发现,我将网线断开以后,然后重新接好后,并且ADOCONNECTION重新连接以后再次动态生成一个存储过程控件以后,在运行存储过程的时候,就提示ct_send():user api layer:external error:Thie routine cannot be called because another command structure has results pending'这是为什么那?????

解决方案 »

  1.   

    我的动态生长的存储过程的代码是这样的:
    //动态生成存储过程控件
    StorPro:=TADOStoredProc.Create(nil);
    StorPro.Connection:=AdoConArray[i].tAConn;
    StorPro.ProcedureName:=ProName;
    StorPro.Parameters.clear;
    StorPro.Close;
    StorPro.Parameters.CreateParameter('a', ftString, pdInput , 10, NULL);
    StorPro.Parameters.CreateParameter('b', ftString, pdInput , 100, NULL);
    StorPro.Parameters.CreateParameter('c', ftString, pdOutput , 255, NULL);
    //给存储过程附参数
    StorPro.Parameters[0].value :=ID;
    StorPro.Parameters[1].value :=Data;
    StorPro.Parameters[2].value :='';
    StorPro.prepared:=true;
    StorPro.ExecProc;执行到StorPro.ExecProc;的时候报错.