如何调用含有多个输入输出参数的存储过程
1个回答
2017-02-01
展开全部
存储过程内部也很有讲究。在asp页面上显示返回参数,要先关闭记录集才行
几种ASP调用存储过程的方法:
1 这也是最简单的方法,两个输入参数,无返回值:
set connection = server.createobject("adodb.connection")
connection.open someDSN
Connection.Execute "procname varvalue1, varvalue2"
’将所有对象清为nothing,释放资源
connection.close
set connection = nothing
2 如果要返回 Recordset 集:
set connection = server.createobject("adodb.connection")
connection.open someDSN
set rs = server.createobject("adodb.recordset")
rs.Open "Exec procname varvalue1, varvalue2",connection
’将所有对象清为nothing,释放资源
rs.close
connection.close
set rs = nothing
set connection = nothing
几种ASP调用存储过程的方法:
1 这也是最简单的方法,两个输入参数,无返回值:
set connection = server.createobject("adodb.connection")
connection.open someDSN
Connection.Execute "procname varvalue1, varvalue2"
’将所有对象清为nothing,释放资源
connection.close
set connection = nothing
2 如果要返回 Recordset 集:
set connection = server.createobject("adodb.connection")
connection.open someDSN
set rs = server.createobject("adodb.recordset")
rs.Open "Exec procname varvalue1, varvalue2",connection
’将所有对象清为nothing,释放资源
rs.close
connection.close
set rs = nothing
set connection = nothing
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询