zoukankan
html css js c++ java
存储过程使用大全 (转)
1
,调用没有参数的存储过程
<
%
set
conn
=
server.
CreateObject
(
"
adodb.connection
"
)
set
cmd
=
server.
CreateObject
(
"
adodb.command
"
)
strconn
=
"
dsn=pubs;uid=sa;pwd"
conn.Open strconn
set
cmd.ActiveConnection
=
conn
cmd.CommandText
=
"
{call nono}"
'
set rs=cmc.exe 或者cmd.execute
set
rs
=
cmd.
Execute
()
%
>
2
,一个输入的参数的存储过程
<
%
set
conn
=
server.
CreateObject
(
"
adodb.connection
"
)
set
cmd
=
server.
CreateObject
(
"
adodb.command
"
)
strconn
=
"
dsn=pubs;uid=sa;pwd"
conn.Open strconn
set
cmd.ActiveConnection
=
conn
cmd.CommandText
=
"
{call oneinput(?)}"
cmd.Parameters.Append cmd.CreateParameter(
"
@aaa
"
,adInteger ,adParamInput )
cmd(
"
@aaa
"
)
=
100
cmd.
Execute
()
%
>
3
,一个输入参数和一个输出的参数
<
%
set
conn
=
server.
CreateObject
(
"
adodb.connection
"
)
set
cmd
=
server.
CreateObject
(
"
adodb.command
"
)
strconn
=
"
dsn=pubs;uid=sa;pwd"
conn.Open strconn
set
cmd.ActiveConnection
=
conn
cmd.CommandText
=
"
{call oneinout(?,?)}"
cmd.Parameters.Append cmd.CreateParameter(
"
@aaa
"
,adInteger,adParamInput)
cmd(
"
@aaa
"
)
=
10
cmd.Parameters.Append cmd.CreateParameter(
"
@bbb
"
,adInteger,adParamOutput)
cmd.
Execute
()
bbb
=
cmd(
"
@bbb
"
)
%
>
4
,一个输入参数,一个输出参数,和一个返回值
<
%
set
conn
=
server.
CreateObject
(
"
adodb.connection
"
)
set
cmd
=
server.
CreateObject
(
"
adodb.command
"
)
strconn
=
"
dsn=pubs;uid=sa;pwd"
conn.Open strconn
set
cmd.ActiveConnection
=
conn
cmd.CommandText
=
"
{?=call onereturn(?,?)}"
cmd.Parameters.Append cmd.CreateParameter(
"
@return_value
"
,adInteger,adParamReturnValue )
cmd.Parameters.Append cmd.CreateParameter(
"
@aaa
"
,adInteger,adParamInput )
cmd(
"
@aaa
"
)
=
10
cmd.Parameters.Append cmd.CreateParameter(
"
@bbb
"
,adInteger,adParamOutput)
cmd.
Execute
()
bbb
=
cmd(
"
@bbb
"
)
rrr
=
cmd(
"
@return_value
"
)
%
>
原文:
http://www.cnblogs.com/dicky/archive/2005/03/13/122580.html
查看全文
相关阅读:
关于上传组件
二分查找的时间复杂度
commander.js
执行上下文
谷歌插件开发
网站性能
日记
<<人间失格>>阅读
Node.js 应该用在什么地方
浅谈前后端分离与实践 之 nodejs 中间层服务
原文地址:https://www.cnblogs.com/dagon007/p/124617.html
最新文章
【leetcode】重新排列单词间的空格
【leetcode】按键持续时间最长的键
【leetcode】按照频率将数组升序排序
【leetcode】特殊数组的特征值
【leetcode】二进制矩阵中的特殊位置
【leetcode】所有奇数长度子数组的和
【leetcode】汇总区间
052-116
052-115
052-114
热门文章
052-113
052-112
取出N个数中出现次数大于N/2的数字
052-110
052-109
052-108
052-107
HTML之marquee(文字滚动)详解
mac安装MongoDB
仅发送options请求,没有发送post解决方案
Copyright © 2011-2022 走看看