最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

記錄集內(nèi)隨機(jī)取記錄的代碼

 更新時(shí)間:2006年06月23日 00:00:00   作者:  
<%
' 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
%>

相關(guān)文章

最新評(píng)論

永善县| 凭祥市| 安陆市| 宜宾市| 长顺县| 城市| 义马市| 额敏县| 北票市| 商丘市| 乐都县| 运城市| 小金县| 稷山县| 封开县| 乌兰县| 宁晋县| 迁西县| 渭源县| 普兰店市| 嘉荫县| 额济纳旗| 满洲里市| 凤山市| 萨嘎县| 迭部县| 钟山县| 古田县| 汪清县| 祁连县| 昌邑市| 伊春市| 博白县| 永春县| 丹巴县| 神池县| 莱阳市| 敦煌市| 远安县| 古丈县| 基隆市|