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;的时候报错.
      

  2.   

    去掉StorPro.Parameters[2].value :='';这句试试
      

  3.   

    StorPro.Parameters.CreateParameter('c', ftString, pdOutput , 255, NULL);
    ”c”只是輸出参数、StorPro.ExecProc執行時、不用付値。{...}
    StorPro.Parameters.ParamByName('a').Value := ID;
    StorPro.Parameters.ParamByName('b').Value := Data;
    StorPro.prepared:=true;
    StorPro.ExecProc;
    返回値 := StorPro.Parameters.ParamByName('c').Value;