Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Authentified Connection to an active directory

HTVi
TV Discussion Newsgroups

Authentified Connection to an active directory
saucisson47 7/13/2007 9:14:02 AM
Hello,
I have a problem to establish an authentified connection with an active
directory. My code :

Private Sub CommandButton_Click()

Const ADS_SECURE_AUTHENTICATION = 0
Dim uid As String
Dim pwd As String
Dim LDAPString As String
Dim LDAP As IADsOpenDSObject
Dim obj As IADs

uid = "saucisson47[ at ]domain.fr"
pwd = "mypassword"
LDAPString = "LDAP://OU=users,DC=domain,DC=fr"

Set LDAP = GetObject("LDAP:")
Set obj = LDAP.OpenDSObject(LDAPString, uid, pwd,
ADS_SECURE_AUTHENTICATION)
End Sub

I have an error on the line LDAP.OpenDSObject :
Erreur d'exécution '91':
variable objet ou variable de bloc with non definie

Thanks for your help

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen