ADOdb w/ SQL producing unspecified error (-2147467259)

Following code snippet is called where UPSZone is an integer ranging from 1-4 and estWeight is a decimal value that is always 1 or greater.


Answer this question

ADOdb w/ SQL producing unspecified error (-2147467259)

  • anukirthi

    I get the same error using VB.NET with an Access2000 database, but only with one of many database calls, and then not always (mostly). If I run the VB app via the developer it never fails.

    I tried putting in waits (timed loops), but it makes no difference.

    Dim DBConnSN12 As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & _
    gblcDatabaseName)

    Dim queryCMDSN12 As OleDbCommand = New OleDbCommand("Servers_Not_Processed_On_Date", DBConnSN12)
    queryCMDSN12.CommandType = CommandType.StoredProcedure

    Dim queryParmSN12 As OleDbParameter = queryCMDSN12.Parameters.Add("@pHost", OleDbType.VarChar, 15)
    queryParmSN12.Value = gstrHostServer
    queryParmSN12 = queryCMDSN12.Parameters.Add("@pDate", OleDbType.Date)
    queryParmSN12.Value = gstrProcessDate


    DBConnSN12.Open()

    Dim cReaderSN12 As OleDbDataReader = queryCMDSN12.ExecuteReader()

    waitcount = 1
    Do While waitcount < MAX_RETRIES
    waitcount = waitcount + 1
    Loop

    If cReaderSN12.HasRows Then

    Log_Admin("")
    Log_Admin("For Backups processed on " & gstrProcessDate & ", Log entries for the following servers were not found:", False, True, "", True)
    Log_Admin("")

    Do While cReaderSN12.Read()
    readerstring = cReaderSN12.GetString(0)
    Log_Admin(readerstring, False, False, "", True)
    ' Add_To_Failed_Backups(readerstring, False)
    System.Windows.Forms.Application.DoEvents()
    waitcount = 1
    Do While waitcount < 1000
    waitcount = waitcount + 1
    Loop

    Loop
    Else
    Log_Admin("All Servers Processed", False, True, "", True)

    End If
    Log_Admin("Finished with Servers Not Processed", False, True, "", True)
    cReaderSN12.Close()
    DBConnSN12.Close()


  • ADOdb w/ SQL producing unspecified error (-2147467259)