Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LDAP vb6 test username and password

Status
Not open for further replies.

tjbradford

Technical User
Dec 14, 2007
229
GB
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"
ado_Open "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


 
Are you in the right forum?

Both your goals and the syntax above look far more like things in the domain of VBScript, not VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top