相思资源网 Design By www.200059.com
复制代码 代码如下:
<%
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
%>
<%
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
%>
标签:
Execute,记录数
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无ASP中使用Set ors=oConn.Execute()时获取记录数的方法的评论...