日期:2014-05-17  浏览次数:20856 次

ASP 下如何调用带参数的存储过程
存储过程
CREATE   procedure   neworderno   @flg   int,@date   datetime
as
if   @flg=1   --采购入库
SELECT   RIGHT(1000001+ISNULL(RIGHT(MAX(bill_number),6),0),6)   as   bill_number
FROM   io_stock   WITH(XLOCK,PAGLOCK)
WHERE   record_date=@date   and   bill_type=0


if   @flg=2   --销售出库
SELECT   RIGHT(1000001+ISNULL(RIGHT(MAX(bill_number),6),0),6)   as   bill_number  
FROM   io_stock   WITH(XLOCK,PAGLOCK)
WHERE   record_date=@date   and   bill_type=1


GO

如何调用存储过程并为存储过程参数赋值

------解决方案--------------------
Conn.Execute "neworderno 1, '2007-01-22 ' "