$addfld = ObjCreate("ADODB.Connection")
$RS = ObjCreate("ADODB.Recordset")
$addfld.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & $mdb_data_path & ";Jet Oledb:Database Password=" & $mdb_data_pwd) ;连接数据库
$RS.ActiveConnection = $addfld
$RS.Open("Select * From dy where shijian like " & "'%" & $cx_time_1 & "%'");
GUICtrlSendMsg($ListView1, $LVM_DELETEALLITEMS, 0, 0)
While Not $RS.eof And Not $RS.bof
If @error = 1 Then ExitLoop
GUICtrlCreateListViewItem($RS.Fields(2).value & "|" & $RS.Fields(1).value & "|" & $RS.Fields(3).value, $ListView1)
$RS.movenext
WEnd
$RS.close
$addfld.Close
代码只查询一个时间的话,是正常可以显示要查询的数据的。但是时间范围就总是试不成功。。
继续顶!!!这个问题没解决,痛苦呀!!! |