您的位置:首页 > 数据库

getStoredProcByArray_SQLSERVER获得存储过程方法

2009-11-05 15:27 429 查看
function getStoredProcByArray(str,CommandTextName)'str为数组,二列n行,第一列为模版参数,第二列为实际参数值,CommandTextName为参数名称
dim myComm,i,j
set myComm=server.CreateObject("adodb.command")
with myComm
.ActiveConnection=conn
.CommandText=CommandTextName
.CommandType=adCmdStoredProc
for i=0 to ubound(str,1)
if str(i,0)<>"" then
set myPar=.CreateParameter(str(i,0),adVarchar,adParamInput,5)
.Parameters.Append mypar
.Parameters(str(i,0))=str(i,1)
end if
next
end with
set getStoredProcByArray=myComm.Execute()
end function
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: