Hello
I need to open with autoit a MS access database!
This database is opening with this shortcut:
"C:\Program Files (x86)\Microsoft Office\OFFICE11\MSACCESS.EXE" /wrkgrp \\server\folder\sys.mdw \\server\folder\database.mdb /user MyUser /pwd MyPass
How do I open this in Autoit. (using COM object)
$adoCon = ObjCreate("ADODB.Connection")
$adoCon.Open("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & $dbname&"; SystemDB="&$wkname&"; " , $user, $pwd)
If Not(IsObj($adoCon)) Then
MsgBox(0,"error","error")
Exit
EndIf
; create recordset
$adoRs = ObjCreate("ADODB.Recordset")
$adoRs.CursorType = 1
$adoRs.LockType = 3
$sQuery = 'SELECT * FROM Address;'
; open query
$adoRs.Open($sQuery, $adoCon)
...
I got an error with the Query !
Need help
Thanks in advance !
Cramaboule