源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

ASP中使用Set ors=oConn.Execute()时获取记录数的方法

  • 时间:2022-04-12 20:24 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:ASP中使用Set ors=oConn.Execute()时获取记录数的方法
[u]复制代码[/u] 代码如下:
<% 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 %>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部