ASP调用存储过程的参数传递问题!!!!
获取参数过程:
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
ALTER procedure ExGenOrderJl @OrderBillNo varchar(50)
as
Declare @BillGuid uniqueidentifier
Declare @BillMxGuid uniqueidentifier
ASP传递参数程序:
set conn=server.CreateObject( "adodb.connection ")
set cmd=server.CreateObject( "adodb.command ")
strconn= "Provider = Sqloledb; User ID = " & OutSqlUsername & "; Password = " & OutSqlPassword & "; Initial Catalog = " & OutSqlDatabaseName & "; Data Source = " & OutSqlLocalName & "; "
conn.Open strconn
set cmd.ActiveConnection=conn
cmd.CommandText= "{call ExGenOrderJl(?)} "
cmd.Parameters.Append cmd.CreateParameter( "@OrderBillNo ",adVarchar,adParamInput,50)
cmd( "@OrderBillNo ")=goods
cmd.Execute()
运行不报错也不能产生结果!
各位大大我这个ASP的参数传递程序要怎么写啊??谢谢了先!
------解决方案--------------------set cmd.ActiveConnection=conn
cmd.commandtype=4
cmd.CommandText= "ExGenOrderJl "
cmd.Parameters.Append cmd.CreateParameter( "@OrderBillNo ",adVarchar,adParamInput,50,goods)
cmd.Execute()