AutoIt
FileDelete("New.mdb") $Error = ObjEvent("AutoIt.Error", "ErrFunc") $ADODB = ObjCreate("ADOX.Catalog") $Struct = DllStructCreate("bool") DllStructSetData($Struct, 1, True) If Not FileExists("New.mdb") Then $ADODB.Create('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=New.mdb;User Id=admin;Password=;') $Table = ObjCreate("ADOX.Table") With $Table .Name = "Test" .Columns.Append('ID', 3) .ParentCatalog = $ADODB .Columns('ID').Properties('AutoIncrement') = DllStructGetData($Struct, 1) EndWith $ADODB.Tables.Append($Table) EndIf Func ErrFunc($oError) ; Do anything here. ConsoleWrite("err.number is: " & @TAB & Hex($oError.number) & @CRLF & _ "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ "err.description is: " & @TAB & $oError.description & @CRLF & _ "err.source is: " & @TAB & $oError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ "err.retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF) EndFunc
When I run code, it show this content of the error
I don't know how to fix it. So I hope u to help me for this problem.err.number is: -2147352567
err.windescription:
err.description is: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
err.source is: Microsoft JET Database Engine
err.helpfile is:
err.helpcontext is: 5000000
err.lastdllerror is: 0
err.scriptline is: 17
err.retcode is: -2147217887
Thanks so much for read my thread ^^




