Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

How to fix 'Multiple-step OLE DB' error???


  • Please log in to reply
No replies to this topic

#1 HoangTieuBao

HoangTieuBao

    Seeker

  • Normal Members
  • 6 posts

Posted 30 July 2012 - 04:17 AM

I have this code:

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

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 ^^










0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users