Err Msg: 0x8000500C - The Active Directory Datatype Cannot be Converted to/from a Native DS Datatype (241981)



The information in this article applies to:

  • Microsoft Site Server 3.0

This article was previously published under Q241981

SYMPTOMS

When you use ADSI (Active Directory Services Interfaces) version 2.5 to retrieve a value for a newly created attribute from a Site Server Membership database, the following error message may occur:
0x8000500C - "The Active Directory datatype cannot be converted to/from a native DS datatype"

CAUSE

With ADSI version 2.0, ADSI forces a schema cache update every time ADSI fails to get the syntax of attribute from the LDAP server, which is represented by the error message above. In ADSI version 2.5, the dynamic schema cache update was removed for performance reasons, and because the forced refresh was thrashing the RootDSE on LDAP version 2.0 servers.

WORKAROUND

Use the following script to refresh the schema and reload the cache before getting the attribute value:
oObject.Get("foo") ' fails with can't convert datatype
Set oSchema = GetObject("LDAP://ServerName:<port #>/Schema") 'get schema object
oSchema.GetInfo ' force refresh of schema
oObject.GetInfo ' force reload of cache info
oObject.Get("foo") ' Now you can read successfully.  Get will succeed
				
You can also restart the Iisadmin service and the other Iisadmin dependant services to cause the schema cache to update.

Modification Type:MajorLast Reviewed:9/23/1999
Keywords:kbprb KB241981