这么读取SQL存储过程的返回值?在线等。。。。。

一aa一 2011-01-22 10:06:12
在存储过程中这样定义变量
@result nvarchar(1000) output

set @result='ok'

那么我在网页中怎么获得这个返回的值呢?
...全文
41 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
一aa一 2011-01-22
  • 打赏
  • 举报
回复
在页面方法中加一句
Public Function UserReg(uname, pass)
Set Cm = Server.CreateObject("Adodb.Command")
With Cm
.CommandType = 4
.ActiveConnection = Conn
.CommandText = "Web_UserReg"
.parameters(1) = uname
.parameters(2) = pass
.parameters(3) = ""
.Execute()
UserReg = .parameters(3)
End With
Set Cm = Nothing
End Function
在引用时
dim text
text=conn. UserReg
response.write text
OK 结贴走人 还是 自己靠得住、、、
yhtapmys 2011-01-22
  • 打赏
  • 举报
回复
http://topic.csdn.net/t/20010704/16/181562.html
ppgame3 2011-01-22
  • 打赏
  • 举报
回复
请教下。 不知道

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧