当前位置: 首页 > 图文教程 > 网络编程 > ASP > ASP之简化创建关闭记录集对象并创建使用简单的MSSQL存储过程

ASP
ASP编程中15个非常有用的例子 (二)
ASP与JSP的比较(一)
ASP与JSP的比较(二)
ASP中五种连接数据库的方法
从ASP调用SQL中的图像
用排序串字段实现树状结构(例程:连接字串)
用排序串字段实现树状结构(例程:删除贴子)
用排序串字段实现树状结构(例程:回复表单)
用排序串字段实现树状结构(例程:显示贴子内容)
用排序串字段实现树状结构(例程:显示树)
用排序串字段实现树状结构(存储过程)
用排序串字段实现树状结构(库结构)
用排序串字段实现树状结构(原理)
remote script文档(转载自微软)(一)
remote script文档(转载自微软)(二)
remote script文档(转载自微软)(三)
remote script文档(转载自微软)(四)
remote script文档(转载自微软)(五)
remote script文档(转载自微软)(六)
remote script文档(转载自微软)(七)

ASP之简化创建关闭记录集对象并创建使用简单的MSSQL存储过程


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 177 ::
收藏到网摘: n/a

ASP 技巧一则之 简化创建关闭记录集对象并创建使用简单的MSSQL存储过程 By shawl.qiu
1. 建造 创建关闭记录集函数
2. 在MSSQL查询分析器中创建简单的MSSQL存储过程
3. 在ASP中应用步骤1,2
shawl.qiu
2006-8-26
http://blog.csdn.net/btbtd
1. 建造 创建关闭记录集函数
linenum
function createRs(rs)
set rs=createObject("adodb.recordset")
end function
function closeRs(rs)
rs.close
set rs=nothing
end function
2. 在MSSQL查询分析器中创建简单的MSSQL存储过程
linenum
create proc dbo.at_sbcat_t1
as
begin
select * from ctatsbcat order by sbcat
end
3. 在ASP中应用步骤1,2
linenum
<% dim rs
call createRs(rs)
with rs
.open "exec dbo.at_sbcat_t1",conn
do until .eof
response.write rs("sbcat")&"<br/>"
.movenext
loop
end with
call closeRs(rs)
%>