我的人生路  
          日歷
          <2005年7月>
          262728293012
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456
          統計
          • 隨筆 - 74
          • 文章 - 57
          • 評論 - 7
          • 引用 - 0

          導航

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          相冊

          顏色

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

           

          <%
          ' Moving to random record - Steven Jones' Extension
          If Not(記錄集名稱.bof and 記錄集名稱.eof) Then
          ' reset the cursor to the beginning
          If (記錄集名稱.CursorType > 0) Then
          記錄集名稱.MoveFirst
          Else
          記錄集名稱.Requery
          End If

          記錄集名稱_totalrn = -1
          記錄集名稱_totalrn = 記錄集名稱.RecordCount ' ony works on some recordsets, but much faster
          If (記錄集名稱_totalrn = -1) Then ' and if it didn't work, we still have to count the records.

          ' count the total records by iterating through the recordset
          記錄集名稱_totalrn=0
          While (Not 記錄集名稱.EOF)
          記錄集名稱_totalrn = 記錄集名稱_totalrn + 1
          記錄集名稱.MoveNext
          Wend

          ' reset the cursor to the beginning
          If (記錄集名稱.CursorType > 0) Then
          記錄集名稱.MoveFirst
          Else
          記錄集名稱.Requery
          End If

          End If

          ' now do final adjustments, and move to the random record
          記錄集名稱_totalrn = 記錄集名稱_totalrn - 1
          If 記錄集名稱_totalrn > 0 Then
          Randomize
          記錄集名稱.Move Int((記錄集名稱_totalrn + 1) * Rnd)
          End If
          End If
          ' all done; you should always check for an empty recordset before displaying data
          %>



          歡迎大家訪問我的個人網站 萌萌的IT人
          posted on 2005-07-07 14:34 一天一點愛戀 閱讀(198) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
           
          Copyright © 一天一點愛戀 Powered by: 博客園 模板提供:滬江博客
          主站蜘蛛池模板: 扎鲁特旗| 怀安县| 海丰县| 车致| 五台县| 竹山县| 义马市| 吴桥县| 陇西县| 阜平县| 新兴县| 苗栗县| 佛冈县| 察哈| 梅河口市| 南岸区| 苍梧县| 岗巴县| 定州市| 财经| 贡觉县| 九龙县| 新源县| 广南县| 团风县| 汉川市| 平度市| 东乡| 体育| 金华市| 隆尧县| 上林县| 阿拉善盟| 黄浦区| 安顺市| 泰来县| 湘潭市| 黄平县| 大兴区| 宿州市| 彭州市|