本帖最后由 www378660084 于 2011-8-24 13:42 编辑
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $i,$test,$accmdb_data_path,$accmdb_data_pws
$accmdb_data_path="data.accdb"
$accmdb_data_pws=""
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 292, 200, 192, 124)
$Button1 = GUICtrlCreateButton("下一个", 96, 72, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$addfld = ObjCreate("ADODB.Connection")
$addfld.Open("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &$accmdb_data_path&";Jet Oledb:Database Password="&$accmdb_data_pws)
$RS =ObjCreate("ADODB.Recordset")
$RS.ActiveConnection = $addfld
$RS.Open ("select work from tba")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If Not $RS.eof And Not $RS.bof Then
$test = $RS.Fields (0).value
$RS.movenext
MsgBox(0,"test",$test)
EndIf
EndSwitch
WEnd
|