本帖最后由 cfs43210 于 2012-3-19 19:31 编辑 While (Not $RS.eof And Not $RS.bof);循环读表
For $i = 0 To $RS.Fields.Count - 1
$RS.Fields($i).Value;显示表第一个数据
Next
$Form1 = GUICreate("Form1", 300, 160, -1, -1, BitOR($WS_SYSMENU, $WS_POPUP))
GUISetBkColor(0xA6CAF0)
GUISetState(@SW_SHOW)
$Label1 = GUICtrlCreateLabel("地址:" & $RS.Fields(4).value, 130, 20, 150, 25)
$file = FileOpen(@WorkingDir & "\temp.jpg", 2 + 16)
If FileWrite($file, $RS.Fields(16).value) = 1 Then
FileClose($file)
$Pic1 = GUICtrlCreatePic(@WorkingDir & "\temp.jpg", 5, 5, 120, 150)
EndIf
$RS.movenext;跳出循环
WEnd;结束循环读表
$RS.close;关闭数据分表
$Conn.Close
|