FIX: "Method 'Recordset' of object 'IAdodc' Failed" Error Message with ADO Data Control (271461)



The information in this article applies to:

  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.5 SP1

This article was previously published under Q271461

SYMPTOMS

When you attach an ActiveX Data Objects (ADO) Recordset to the Microsoft ADO Data Control, the following error message occurs:
Run-time error '-2147417848 (80010108)':

Method 'Recordset' of object 'IAdodc' failed

CAUSE

The error message has been reported to occur under the following conditions:
  • The Microsoft Jet OLE DB Provider is being used.
  • The ADO Recordset uses the adCmdTableDirect command type.
  • The ADO Recordset uses the adUseServer cursor location.

RESOLUTION

This problem is fixed in the latest service packs for Windows 2000 and MDAC 2.5.
  • To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

    260910 How to Obtain the Latest Windows 2000 Service Pack

  • To resolve this problem, obtain the latest service pack for Microsoft Data Access Components 2.5. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

    293312 INFO: How to Obtain the Latest MDAC 2.5 Service Pack

The English version of this fix should have the following file attributes or later:
   Date         Version       Size      File name     Platform
   -----------------------------------------------------------
   09/08/2000   2.51.5708.0   487,696   Msado15.dll   x86 

WORKAROUND

To work around this problem:
  • Set the CursorLocation property of the Recordset object to adUseClient.

    -or-

  • Use any command type other than adCmdTableDirect.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Data Access Components (MDAC) version 2.5 Service Pack 2, MDAC version 2.6, and Microsoft Windows 2000 Service Pack 2.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Standard EXE project in Microsoft Visual Basic 6.0.
  2. Insert an instance of the Microsoft ADO Data Control 6.0.
  3. Add a command button named Command1, and insert the following code into the Click event handler:
    Private Sub Command1_Click()
    Dim conn As ADODB.Connection
    Dim rs As ADODB.Recordset
    
        Set conn = New Connection
        ' Point this to NorthWind.mdb sample database.
        conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                  "Data Source=NorthWind.mdb"
        Set rs = New Recordset
        rs.CursorLocation = adUseServer
        Set rs.ActiveConnection = conn
        rs.Properties("IRowsetIdentity").Value = True
        rs.Open "Customers", , adOpenKeyset, adLockOptimistic, adCmdTableDirect
        Set Adodc1.Recordset = rs
    
    End Sub

Modification Type:MajorLast Reviewed:4/7/2006
Keywords:kbQFE KBHotfixServer kbADO260fix kbBug kbfix kbMDAC250SP2fix kbMDAC260fix KB271461