Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
ldap error on Windows XP
Old
  (#1)
Lorenzo
Guest
 
Posts: n/a
Default ldap error on Windows XP - 06-04-2007, 09:48 AM

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.Connection
Dim ocommand As ADODB.Command

' Create ADO connection object for Active Directory
Set con = CreateObject("ADODB.Connection")
con.Provider = "ADsDSOObject"
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("ADODB.Command")
ocommand.ActiveConnection = con
Set oRoot = GetObject("LDAP://nomeserverldaportnumber/O=myorganization")
.......

At this point I get the error :

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

I also tried to execute

LDAP://nomeserverldaportnumber/O=myorganization

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"
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top