用输出 参数
在存储过程中定义
@par 类型 AS
yoursqlcommand.Direction=ParameterDirection.Output;
执行
然后取出这个参数的值

解决方案 »

  1.   

    上面存储过程应该加上 参数后面加上OUTPUT
      

  2.   

    我的存储过程为
    CRAEAT PROCEDURE getCT
    @cy_code int
    @acs int
    @containerType
    AS
     declare @par int
      select @par=containerType
      from container
      where cy_code=@cy_code and @acs between acs_start and acs_end
      if(@par=@containerType)
      return 1
      else
      return 0
    go那位高手指点,在上面的程序中返回参数?谢谢。谢谢·