最新国产好看的视频,伊人天堂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)論

论坛| 衡阳市| 西平县| 九龙县| 玉树县| 巢湖市| 扶风县| 盐边县| 扬中市| 红河县| 罗源县| 岳池县| 苗栗市| 墨江| 依兰县| 罗平县| 石渠县| 武城县| 施秉县| 邻水| 阳江市| 松原市| 抚顺县| 巫溪县| 稻城县| 武乡县| 新安县| 金寨县| 安阳市| 伊宁县| 徐闻县| 靖江市| 肇庆市| 越西县| 黔西县| 利辛县| 邹城市| 乌海市| 凭祥市| 中山市| 庆云县|