tjbradford
Technical User
I have been looking for weeks to try and find some working examples of how to test if a users username and password are correct.
the best / cleanest example i can find is below however it craps out on the set objectlist =
Private Sub Form_Load()
Set ado = CreateObject("ADODB.Connection") 'create new ADO connection
ado.Provider = "ADSDSOObject" 'use the ADSI interface
ado.Properties("User ID") = LogonName 'pass credentials - if you omit this, the search is performed....
ado.Properties("Password") = Password '... with the current credentials
ado.Properties("Encrypt Password") = True 'only needed if you set "User ID" and "Password"
adpen "connection-name" 'use any name for this connection
Set objectList = ado.Execute("<LDAP://abc.xyz.internal/ou=test,dc=abc,dc=internal>; LDAPfilter;ADSPath;subtree")
End Sub
the error message is Run-Time error "-2147217900 (80040e14)":
should that ado be able to test a username and password field.
any help really appreciated as i'm drawing a blank on examples and guides
the best / cleanest example i can find is below however it craps out on the set objectlist =
Private Sub Form_Load()
Set ado = CreateObject("ADODB.Connection") 'create new ADO connection
ado.Provider = "ADSDSOObject" 'use the ADSI interface
ado.Properties("User ID") = LogonName 'pass credentials - if you omit this, the search is performed....
ado.Properties("Password") = Password '... with the current credentials
ado.Properties("Encrypt Password") = True 'only needed if you set "User ID" and "Password"
adpen "connection-name" 'use any name for this connection
Set objectList = ado.Execute("<LDAP://abc.xyz.internal/ou=test,dc=abc,dc=internal>; LDAPfilter;ADSPath;subtree")
End Sub
the error message is Run-Time error "-2147217900 (80040e14)":
should that ado be able to test a username and password field.
any help really appreciated as i'm drawing a blank on examples and guides