iankasce.blogg.se

Datatype enumeration vs. microsoft access data types
Datatype enumeration vs. microsoft access data types









Wscript.Echo “Datatype: ” & “String (Object-Identifier)” Wscript.Echo “Datatype: ” & “String (Octet or SID)” Wscript.Echo “Datatype: ” & “Integer or Enumeration” Wscript.Echo “Single-valued: ” & objAttribute.isSingleValued (“LDAP://cn=telephone-Number,cn=schema,cn=configuration,dc=fabrikam,dc=com”) There are some slight differences between ADsType and oMSyntax, but for script writers they don’t really matter the information oMSyntax returns will likely tell you everything you need to know.Īt least we hope so, because that’s the route we ended up taking: Set objAttribute = GetObject _ Eventually we stumbled upon an attribute we had never heard of: oMSyntax, which returns the syntax value assigned to an attribute. So we started digging through the Active Directory schema, looking for something that would tell us the data type of the object. (And we Scripting Guys pride ourselves on our elegance.) That sounded way too complicated: you bind to the attribute in the schema to get one bit of information, then have to bind to an actual object to get the second bit of information. It turns out that you can’t get the ADsType when binding to an attribute in the schema instead, you have to retrieve the property from an actual object (such as a user account) and then you can determine the data type. We also knew that there was an attribute – ADsType – that tells you the data type of an attribute.

datatype enumeration vs. microsoft access data types datatype enumeration vs. microsoft access data types

Why? Well, it’s easy enough to bind to any Active Directory attribute and find out whether it’s single-valued or multi-valued in fact, each attribute has its own attribute ( isSingleValued) that tells you that very thing. As you’ve probably already figured out, however, it turned out to be a bit more complicated than we expected. You know, this turned out to be one of those questions that drive us crazy: after all, it seemed like it would be so easy to answer. Hey, Scripting Guy! How can I query the Active Directory schema for an attribute’s data type and whether it is single-valued or multi-valued?











Datatype enumeration vs. microsoft access data types