人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當前位置:蘿卜系統下載站 > 技術開發教程 > 詳細頁面

在asp中通過getrows完成數據庫記錄分頁的一段代碼,希望對大家實用

在asp中通過getrows完成數據庫記錄分頁的一段代碼,希望對大家實用

更新時間:2022-08-01 文章作者:未知 信息來源:網絡 閱讀次數:


<%@ Language = VBSCRIPT %>
<% Option Explicit %>
<%
rem 在asp中通過getrows實現數據庫記錄分頁的一段代碼
  Dim iStart, iOffset
  iStart = Request("Start")
  iOffset = Request("Offset")

  if Not IsNumeric(iStart) or Len(iStart) = 0 then
    iStart = 0
  else
    iStart = CInt(iStart)
  end if

  if Not IsNumeric(iOffset) or Len(iOffset) = 0 then
    iOffset = 30
  else
    iOffset = Cint(iOffset)
  end if

  Response.Write "Viewing " & iOffset & " records starting at record " & iStart & "<BR>"

  Dim objConn, objRS
  Set objConn = Server.CreateObject("ADODB.Connection")
  'objConn.Open "DSN=MP3"
dim connstr
dim db
db="csnjimageman.mdb"
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
objconn.Open connstr

  Set objRS = Server.CreateObject("ADODB.Recordset")
  objRS.Open "SELECT * FROM imageinfo", objConn

  Dim aResults
  aResults = objRS.GetRows

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

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統下載排行

網站地圖xml | 網站地圖html
主站蜘蛛池模板: 泽库县| 康定县| 冷水江市| 贺州市| 汝州市| 崇阳县| 杭锦旗| 兰西县| 玉田县| 鄂温| 绥德县| 遂宁市| 三明市| 翁牛特旗| 靖边县| 镇赉县| 堆龙德庆县| 察雅县| 高青县| 道真| 夏邑县| 乌苏市| 丹东市| 绵阳市| 阜城县| 新余市| 南华县| 彩票| 阜南县| 邵东县| 孝昌县| 高要市| 临邑县| 三亚市| 德令哈市| 定结县| 林芝县| 菏泽市| 科尔| 旌德县| 卫辉市|