delphi中用STOREDPROC调用SQL2000中的INSERT存储过程
报错如下,
project ufo.exe raised exception class edbengineerror with message
'parameter not set in query string' process stopped .use step or run to continue.在STOREDPROC中PARAMS里各项设置了参数,类型定义为STRING,INPUT,
不知道为什么报错,求教各位高手,谢谢,?但是在执行查询的存储过程是却不会报错,这是为什么呢???
??困惑啊

解决方案 »

  1.   

    可以先Prepare一下,另外建议使用ADO,因为BDE与SQL2000之间的连接不是很好,我曾经碰到存储过程在查询分析器中运行调试都没错,但使用BDE连接的Delphi程序中出错,改ADO连接则不存在这个问题。
    另外存储过程的参数传递和执行,建议使用QUERY,运行SQL语句执行。
      

  2.   

    应该是参数创建或赋值的问题…  with TStoredProc.Create( application ) do
      try
        DatabaseName := DBInfo.CurrentDB.DatabaseName;
        StoredProcName := 'sqlbase..sp_ztchange_stockamount';
        Params.CreateParam( ftString,'@vc_user',ptInput );
        Params.CreateParam( ftString,'@vc_user_password',ptInput );
        Params.CreateParam( ftInteger, '@i_fund_account', ptInput );
        Params.CreateParam( ftInteger, '@i_date', ptInput );    ParamByName( '@vc_user' ).AsString := Me.sUserID;
        ParamByName( '@vc_user_password' ).AsString := Me.sPassword;
        ParamByName( '@i_fund_account' ).AsInteger := edtFA.AsInteger;
        ParamByName( '@i_date' ).AsInteger := GetDate;
        ExecProc;    iErrMsg := ParamByName( 'result' ).AsInteger;
      finally
        free;
      end;
      

  3.   

    不错 是参数传递 有问题!我经常碰到的 建议 你先 fresh一下!
      

  4.   

    出现下面这个错又是怎么回事呢??
    project ufo.exe raised class enoresultset with message 
    'error creating cursor handle 'process stopped .use step or run to continue.是那个方面有问题啊??,谢谢各位