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) %>