Microsoft KB Archive/271461

= FIX: &quot;Method 'Recordset' of object 'IAdodc' Failed&quot; Error Message with ADO Data Control =

Article ID: 271461

Article Last Modified on 4/7/2006

-

APPLIES TO


 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.5 Service Pack 1

-



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.



Steps to Reproduce Behavior
 Create a new Standard EXE project in Microsoft Visual Basic 6.0.</li> Insert an instance of the Microsoft ADO Data Control 6.0.</li>  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 &quot;Provider=Microsoft.Jet.OLEDB.4.0;&quot; & _ &quot;Data Source=NorthWind.mdb&quot; Set rs = New Recordset rs.CursorLocation = adUseServer Set rs.ActiveConnection = conn rs.Properties(&quot;IRowsetIdentity&quot;).Value = True rs.Open &quot;Customers&quot;,, adOpenKeyset, adLockOptimistic, adCmdTableDirect Set Adodc1.Recordset = rs

End Sub </li></ol>

Additional query words: adodc method recordset iadodc failed object

Keywords: kbbug kbfix kbado260fix kbmdac250sp2fix kbqfe kbmdac260fix kbhotfixserver KB271461

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.