为什么不用TStoredProc控件?如果返回数据集,用storedProc1.Open,否则就用storedProc1.ExecProc;

解决方案 »

  1.   

    select @jg=( select jg1  from yp_ypjgsd   where xmdh=@xmdh)
    一句改成:
    select @jg=jg1  from yp_ypjgsd   where xmdh=@xmdh)
      

  2.   

    To:liuziran(倒立旋风转的青蛙)
    select @jg=( select jg1  from yp_ypjgsd   where xmdh=@xmdh)
    一句改成:
    select @jg=jg1  from yp_ypjgsd   where xmdh=@xmdh)
    还是不行呀 
      

  3.   

    with query1 do
         begin
              close;
              sql.clear;
              sql.add('Execute mzsf_xmjg123 :xmdh');
              parambyname('xmdh').asinteger:=1123;
              ExecSQL;
         end;
      

  4.   

    如果要输出@jg的话,应该声明:
    CREATE PROCEDURE MZSF_XMJG123
    (
     @xmdh numeric(5,0),
     @jg money output
    )
    AS
    ...
      

  5.   

    回复: genphone_ru(票票) 
    不行,还是老样子
      

  6.   

    别用了tquery了,用tstoreproc来调用存储过程。
      

  7.   

    同意liuziran的,
       首先过程里面要有输出声明,程序执行才可以得到返回值哦。
      

  8.   

    用tstoreproc来调用存储过程
    问题依然一样