Sign in to follow this  
Followers 0

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

1 post in this topic

Posted

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

Share this post


Link to post
Share on other sites



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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.