Hi <BR><BR> We are developing a product using Visual Basic. One of the module is access LDAP data store using ADSI LDAP provider for ADO. It works fine, if the ADO Version is 2.1 or less than that. If the ADO Version is greater than 2.1 it is giving me &#039;CLASS NOT REGISTERED&#039; error. Could you please help me in this? <BR><BR><BR>Regards<BR><BR>Sakthivel.T<BR><BR>--------------------------------------------------------------------------------<BR><BR>Sample code :-<BR>----------------------<BR>&#039; To Search the user in LDAP Repository<BR>Public Function GetCurrentBaseURL(strLoggedUser) As String<BR>On Error GoTo BaseURL_Error <BR>&#039;NOTE:- Server,IDSPort,BaseURI all the GLOBAL Constants<BR>If InStr(1, Server, ":") = 0 Then<BR> Server = Server & ":" & IDSPort<BR> ADsPath = "LDAP://" & Server & ":" & IDSPort & "/" & BaseURI<BR>Else<BR> ADsPath = "LDAP://" & Server & "/" & BaseURI<BR>End If<BR>&#039;<BR><BR> Set con = CreateObject("ADODB.Connection.1")<BR> con.Provider = "ADsDSOObject"<BR> con.Properties("User ID") = Username<BR> con.Properties("Password") = Password<BR> con.Open "ADSI"<BR> <BR> <BR> Set Com = CreateObject("ADODB.Command.1")<BR> Set Com.ActiveConnection = con<BR> Com.CommandText = "SELECT ADsPath FROM &#039;" & ADsPath & "&#039; WHERE cn=&#039;" & strLoggedUser & "&#039;"<BR> Set rs = Com.Execute<BR> <BR> If Not (rs.BOF And rs.EOF) Then<BR> Do While Not (rs.EOF)<BR> Result = rs.Fields("ADsPath")<BR> Exit Do<BR> rs.MoveNext<BR> Loop<BR> Else<BR> Result = "Null"<BR> End If<BR><BR> GetCurrentBaseURL = Result<BR> <BR>BaseURL_Exit:<BR> Exit Function<BR>BaseURL_Error:<BR> Resume BaseURL_Exit<BR>End Function<BR><BR>--------------------------------------------------------------------------------<BR>The above code works fine for ADO 2.1, but for ADO 2.6 it raises the CLASS NOT REGISTERED error.<BR>