none
Data provider or other service returned an E_Fail status.

    Question

  • This is quite a strange error that occurred after applying SP2 to SQL2005.  This code has worked for 10 years prior to this using VB6, including running against SQL2005 SP1.  The error occurs on the last line of the code excerpt (in bold).  How should this error be handled?  Thanks.

     

    Error Details:

    Err.Number = -2147467259

    Err.Description = Data provider or other service returned an E_FAIL status.

    Err.Source = Microsoft Cursor Engine

     

     

    Code Excerpt:

     

    Dim iRecCount as Integer

     

    With cmd
        .ActiveConnection = cnngdbConnection
        .CommandText = "usp_system_busy2"
        .CommandType = adCmdStoredProc
        ' add params
       .Parameters.Append .CreateParameter("RETURN_VALUE", adInteger, adParamReturnValue, , Null)
       'input params
       .Parameters.Append .CreateParameter("@login_ind", adBoolean, adParamInput, , 1)
       .Parameters.Append .CreateParameter("@db_Name", adVarChar, adParamInput, 10, gsDatabaseName)
    End With
    cnngdbConnection.CursorLocation = adUseClient
    Set rstSnp = cmd.Execute
    Set cmd = Nothing
    cnngdbConnection.CursorLocation = adUseServer
    iRecCount = rstSnp.RecordCount
    Tuesday, February 19, 2008 11:30 AM

Answers

  • Note: This is a guess!

    Try installing the SQL native client and applying sp2 to the machine with the VB6 app then change your connection string to use the native client.

    JM
    Tuesday, February 19, 2008 6:17 PM

All replies

  • Note: This is a guess!

    Try installing the SQL native client and applying sp2 to the machine with the VB6 app then change your connection string to use the native client.

    JM
    Tuesday, February 19, 2008 6:17 PM
  • Hi Jason, That did get me around the E_Fail error.  Thanks.

    Friday, February 22, 2008 12:58 PM