How to access LDAP server via ADSI?

How to access LDAP server via ADSI?

Post by Daniel H?nl » Fri, 09 Mar 2001 01:21:55



Hello!

I try to access an LDAP server (OpenLDAP) from a VisualBasic program via
ADSI calls.

All ADSI operations (e.g. put of an attribute) work properly, but the get of
an attribute does not work.

The attribute "policyName" that I try to access is defined in the schema
with syntax "UTF-8 string" and as single-valued.

When I access the same data via Java (JNDI) everything works fine.

I used the following piece of code:

Private Sub btnGet_Click(Index As Integer)

    Dim policy As IADs

    Dim policyName As String

    Set policy = GetObject("LDAP://horus:20000/policyName=policy3," & _

        "csxRootType=policies, testParentName=testParent" )

    policyName = policy.Get("policyName")

End Sub

The Get operation results in the following ADSI error:

      Value
     Code
     Description
     Corrective Action

      0x8000500CL
     E_ADS_CANT_CONVERT_DATATYPE
     The data type cannot be converted to/from a native DS data type.
     Make sure that the correct data type is used and/or that there is
sufficient schema information available to perform data type conversion.

Thanks for every hint,

                        Daniel

 
 
 

1. LDAP/ADSI access to Exchange 5.5 public folder information

I have been using DAPI to access the Public Folder information(not messages,
but display name, etc).
We are moving to ADSI/LDAP so it works with Exchange 2K.
I cannot find any of the public folder information in our 5.5 org with an
ADSI browser.

WHere can I find some information on this?

Thanks

2. Cannot Access OWA!! Please help

3. ADSI-->LDAP access to Global Address List question

4. Do you need custom Exchange Add-Ins?

5. access contacts in a mailbox by adsi and ldap

6. setting forward through OWA

7. access exchange ldap using adsi

8. Outlook web access problem

9. How to find Exchange Domain Servers element in LDAP / ADSI

10. Accessing Exchange Directories via LDAP

11. accessing Exchange Class via LDAP and ADO

12. Reading Exchange Directory via LDAP or Access..

13. Accessing Exchange via LDAP protocol