1997危情杀机在线:一句存储过程程序,不懂?

来源:百度文库 编辑:神马品牌网 时间:2024/05/08 18:52:23
Cmd.parameters.append Cmd.createparameter("@record",adInteger,adParamoutput)
此处过程,是什么意思啊?是asp调用存储过程的固定格式吗

给你一段例子,应该看起来比较容易,如果看不明白的话,你可以去看一我这篇文章:
http://bbs.51js.com/viewthread.php?tid=51505&fpage=2
关于存储过程的。

Dim adoComm
'// 创建一个对象,我们用来调用存储过程
Set adoComm = CreateObject("ADODB.Command")
With adoComm
'// 设置连接,设 adoConn 为已经连接的 ADODB.Connection 对象
.ActiveConnection = adoConn
'// 类型为存储过程,adCmdStoredProc = 4
.CommandType = 4
'// 存储过程名称
.CommandText = "upUserLogin"
'// 设置登录名称
.Parameters.Item("@strLoginName").Value = "admin"
'// 设置登录密码
.Parameters.Item("@strLoginPwd").Value = "123456"
'// 执行存储过程
.Execute

'// 判断是否登录成功
If .Parameters.Item("@blnReturn").Value = 1 Then
Response.Write "恭喜你,登录成功!"
Else
Response.Write "不是吧,好像错了哦。。。"
End If
End With
'// 释放对象
Set adoComm = Nothing

不太准确,这是给command对象增加一个参数