HoangTieuBao Posted July 30, 2012 Share Posted July 30, 2012 I have this code: 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 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 I don't know how to fix it. So I hope u to help me for this problem. Thanks so much for read my thread ^^ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now