Skip Navigation Links
Home
+
About
+
Products
+
Support
+
Purchase
+
Search
+
AddNoTrans (Method of LDAPAttributeCollection)
Insert a new attribute into the directory with a string value, without using UTF-8 or Unicode translation.
Syntax
AddNoTrans(AttributeName As String, Value As String) As LDAPAttribute
Remarks
The AddNoTrans method performs the same function as the Add method, except that it does not attempt and UTF-8 encoding.
Example
Set pLDAP = CreateObject("LDAPClient.3")
Call pLDAP.Connect("awkwardldapserver")
Set pEntries = pLDAP.Search("o=airius.com", "uid=printer1")

' We're using the the awkward LDAP server, which doesn't use
' UTF8 to transport strings. But we know it uses double-byte
' Unicode instead, which is also what VB uses, so we can pass
' our string directly to AddNoTrans to avoid any character
' translation.
Call pEntries(0).Attributes.AddNoTrans("description", "André's printer.")