我用adostoredproc指向adoconnection,但在adostoredproc属性procedurename里没有东西呀?怎么找到存储过程呀?

解决方案 »

  1.   

    如果你数据库中没有写,那么在procedurename里面是看不见的,不知道你的adostoredproc打开没有,就是你的adoconnection打开没有
      

  2.   

    你试一下在程序中连接:
      conn:TADOConnection;
      spGetGxName: TADOStoredProc;  spGetGxName.ConnectionString:=conn;  with spGetGxName do
      begin
        Close;
        ProcedureName:='prGetGxName';//存储过程名称
        Parameters.Clear;
        Parameters.CreateParameter('@Contr_Year',ftString,pdinput,15,Trim(CommContrYear.Text));
        prepared:=true; 
        open;
    end;
       具体的结合你自己的实际情况修改就可以了。
      

  3.   

    如果connection设置正确,procedurename你是可以选择到的
      

  4.   

    检查一下你的存储过程是否与数据库对应.adoconnection是否与数据库对应