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
查看全文
相关阅读:
app后端session共享问题
nignx
dubbo
lucene&solr-day1
SSM框架整合,以CRM为例子
SpringMVC入门第二天
HBase集群搭建
SecureCRT的Home+End+Del键映射
记一次让人的喷血的排错经历
基于docker搭建mysql集群
原文地址:https://www.cnblogs.com/dagon007/p/124617.html
最新文章
Maven的继承
Maven统一修改版本号
Maven依赖的传递性
Maven生命周期
Maven的依赖
Maven是什么
Maven的仓库
Maven坐标
Spring IOC(控制反转)
高并发解决方案限流技术-----使用RateLimiter实现令牌桶限流
热门文章
高并发解决方案限流技术-----计数器
VRRP协议:Virtual Route
lvs + keepalived + gninx 高性能负载均衡
四层负载均衡,七层负载均衡
TCP,UDP,http
网络模型
阿里云域名+ 腾讯云服务器 配置nginx
Redis笔记1-redis的搭建和使用
RSA非对称加密
AES对称加密
Copyright © 2011-2022 走看看