首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

ASP中通过GetRows实现数据库记录分页的一段代码

整理日期:2007年08月04日 【字体:


伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-08/1186206297.html
 objRS.Close
 Set objRS = Nothing

 objConn.Close
 Set objConn = Nothing


 Dim iRows, iCols, iRowLoop, iColLoop, iStop
 iRows = UBound(aResults, 2)
 iCols = UBound(aResults, 1)

 If iRows > (iOffset + iStart) Then
  iStop = iOffset + iStart - 1
 Else
  iStop = iRows
 End If

 For iRowLoop = iStart to iStop
  For iColLoop = 0 to iCols
   Response.Write aResults(iColLoop, iRowLoop) & " "
  Next
  Response.Write "<BR>"
 Next

 Response.Write "<P>"
 if iStart > 0 then
  'Show Prev link
  Response.Write "<A HREF=""GetRows.asp?Start=" & iStart-iOffset & _
          "&Offset=" & iOffset & """>Previous " & iOffset & "</A>"
 end if

 if iStop < iRows then
  'Show Next link
  Response.Write " <A HREF=""GetRows.asp?Start=" & iStart+iOffset & _
          "&Offset=" & iOffset & """>Next " & iOffset & "</A>"
 end if
%>
Tags:
ASP中通过GetRows实现数据库记录分页的一段代码
'http://www.etoow.com/html/2007-08/1186206297.html
1
 
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved