ldap error on Windows XP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lorenzo

    ldap error on Windows XP

    I'm trying to access to a LDAP server by a
    VB 6 application in order to get info about user.

    The following code works fine running on
    Windows 2000 professional but fails on
    Windows XP.

    Can anybody give me any information
    about this kind of conflict ?

    Thank you


    I'm including in my VB project' references :

    - Microsoft ActiveX Data Objects 2.5 Library (msado25.tlb)
    - Active DS Type Library (activeds.tlb)


    Dim con As ADODB.Connectio n
    Dim ocommand As ADODB.Command

    ' Create ADO connection object for Active Directory
    Set con = CreateObject("A DODB.Connection ")
    con.Provider = "ADsDSOObje ct"
    con.Properties( "ADSI Flag") = ADS_USE_SSL + ADS_SERVER_BIND
    con.Open "Active Directory Provider"

    ' Create ADO command object for the connection.
    Set ocommand = CreateObject("A DODB.Command")
    ocommand.Active Connection = con
    Set oRoot = GetObject("LDAP ://nomeserverldap: portnumber/O=myorganizatio n")
    .......

    At this point I get the error :

    err.Number = -2147016646
    err.Description = Automation Error

    I also tried to execute

    LDAP://nomeserverldap: portnumber/O=myorganizatio n

    straight from RUN menu and again, on Windows 2000 professional all works fine,
    while on XP I get this error message

    "The specified directory service could not be reached.
    The service may be temporarily unavailable or the server name may be incorrect"
Working...