Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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

↑ Back to the top


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.

↑ Back to the top


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 

↑ Back to the top


Workaround

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

    -or-

  • Use any command type other than adCmdTableDirect.

↑ Back to the top


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.

↑ Back to the top


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

↑ Back to the top


Keywords: KB271461, kbmdac260fix, kbmdac250sp2fix, kbfix, kbbug, kbado260fix, kbhotfixserver, kbqfe

↑ Back to the top

Article Info
Article ID : 271461
Revision : 4
Created on : 4/7/2006
Published on : 4/7/2006
Exists online : False
Views : 535