This article was previously published under Q271461
This article has been archived. It is offered "as is" and will no longer be updated.
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
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.
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 theMicrosoft 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 theMicrosoft 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
To work around this problem:
Set the CursorLocation property of the Recordset object to adUseClient.
Use any command type other than adCmdTableDirect.
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.
Insert an instance of the Microsoft ADO Data Control 6.0.
Add a command button named Command1, and insert the following code into the Click event handler:
Private Sub Command1_Click()Dim conn As ADODB.ConnectionDim 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 = rsEnd Sub