本帖最后由 landays 于 2009-6-6 13:01 编辑 $addfld = ObjCreate("ADODB.Connection")
$addfld.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &$mdb_data_path)
$RS =ObjCreate("ADODB.Recordset")
$RS.ActiveConnection = $addfld
$RS.Open ("Select TOP 1 "&$T & " From " & $tblname & " ORDER BY Rnd(id)") ;打开数据分表
;$RS.Open ("select top 17 "&$T & " From " & $tblname & " ORDER by id desc") ;打开数据分表
while Not $RS.eof And Not $RS.bof
if @error =1 Then ExitLoop
MsgBox(0, "", $RS.Fields (1).value)
$rs.movenext
WEnd
$rs.close
$addfld.Close
用以上代码测试,2楼的可以显示最后17条
楼上的代码怎么是固定显示一条的? |