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

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Authentified Connection to an active directory
saucisson47 13.07.2007 09:14:02
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