手机
当前位置:查字典教程网 >编程开发 >ASP教程 >ASP中使用Set ors=oConn.Execute()时获取记录数的方法
ASP中使用Set ors=oConn.Execute()时获取记录数的方法
摘要:复制代码代码如下:

复制代码 代码如下:

<%

Dim oConn, ors, aRows

Dim i,j

Set oConn=Server.CreateObject("ADODB.Connection")

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("database/newasp.resx")

Set ors=oConn.Execute("Select TOP 5 SoftID,SoftName FROM NC_SoftList")

Response.Write "RecordCount:" & ors.RecordCount & "<br/>" '-1

aRows=oRs.GetRows(-1) 'oRs.Eof=True,aRows(col,row)

Set ors=Nothing

oConn.Close()

Set oConn=Nothing

If IsArray(aRows) Then

Response.Write "RecordCount:" & UBound(aRows,2)+1 & "<br/>"

For i=0 To UBound(aRows,2)

For j=0 To UBound(aRows,1)

Response.Write aRows(j,i)

If j<> UBound(aRows,1) Then Response.Write ","

Next

Response.Write "<br/>"

Next

End If

%>

【ASP中使用Set ors=oConn.Execute()时获取记录数的方法】相关文章:

ASP中Response对象的集合、属性和方法介绍

在ASP中使用均速分页法提高分页速度的方法

asp 常用函数用法

ASP跳出本次循环进入下一循环的方法

ASP中利用execute实现动态包含文件的方法

ASP中生成文本文件的两种方式

用asp实现无组件生成验证码的方法2种

三种禁用FileSystemObject组件的方法

使用NetBox编译asp 完全摆脱iis束缚

ASP 中使用 HTTP 协议发送参数详解

精品推荐
分类导航