PRB: Using ADO with ADSI Returns 'Error 800a01ad (429)'

ID: Q223048


The information in this article applies to:


SYMPTOMS

When using Active Data Objects in conjunction with Active Directory Services Interfaces (ADSI), the application may return the following error:

Error 800a01ad (429) - ActiveX component can't create Object.


CAUSE

This error may result from the installation of an older version of ADSI on a computer with Microsoft Data Access Components (MDAC) version 2.1.

Older versions of ADSI install Active Data Objects version 1.0. This installation sets version 1.0 as the current version of ADO. When CreateObject() is called, it attempts to create the current version of the object, which in this case is version 1.0. Since version 1.0 has different dependencies and functionality than ActiveX Data Objects version 2.1, this call fails.

NOTE: The change in the current version affects all CreateObject() calls for this computer, not only those applications that are using ADSI. This will have a detrimental effect on applications using functionality outside of version 1.0.


RESOLUTION

To resolve this problem you must first reinstall MDAC 2.1 in order to solve OLE-DB compatibility issues. You can do this by determining how you acquired MDAC 2.1 and reinstalling it from that source.

For information on what products ship with MDAC 2.1 please refer to the following Web site:

http://www.microsoft.com/data
In most cases the installation file for MDAC is Mdac_typ.exe. Running this should return all files to the current version of 2.1.

At this point there are two possible solutions:


MORE INFORMATION

It is possible to work around these compatibility issues by explicitly creating ADO objects of version 1.0. Previous versions of ADSI are compatible with this version of ADO. Note that any ADO object that will be used must be explicitly created as version 1.0. Following is an example of how to accomplish this task:


   Set oConnection = CreateObject("ADODB.Connection.1")
   Set oRecordset = CreateObject("ADODB.Recordset.1")

      oConnection.Provider = "ADsDSOObject"
      oConnection.Open "ADs Provider"
      strQuery = "<LDAP://ServerName>;(objectClass=*);cn,adspath;subtree"
      Set oRecordset = oConnection.Execute(strQuery)
      While Not oRecordset.EOF
      ' Code to examine the recordset.
      oRecordset.MoveNext
   Wend

   Set oRecordSet = Nothing
   Set oConnection = Nothing 
Please note that "Error '800a01ad (429)'" is caused by a conflict in ADO. Installing ADSI version 2.5 or using the preceding work around will not stop this error from occurring. You must reinstall MDAC version 2.1 in order to solve this problem.


REFERENCES

For additional information about Active Directory Services Interfaces compatibility issues with Microsoft Data Access Components version 2.1, please see the following article in the Microsoft Knowledge Base:

Q216709 ADSI 2.0, 2.5, and MDAC 2.1 Compatibility Issues
For more information about Active Directory Services Interfaces (ADSI), please refer to the following Web site:
http://www.microsoft.com/adsi/
For more information on Microsoft Data Access Components (MDAC), please refer to the following Web site:
http://www.microsoft.com/data/

Additional query words: kbADSI kbGrpMsg kbMsg kbADO kbADO100 kbADO200


Keywords          : kbADO kbADO100 kbADO200 kbADSI kbMsg kbGrpMsg 
Version           : WINDOWS:1.0,2.0,2.1; winnt:1.0,2.0
Platform          : WINDOWS winnt 
Issue type        : kbprb 

Last Reviewed: May 14, 1999