|
-
Mar 13th, 2008, 04:18 AM
#6
PowerPoster
Re: How to retrieve All info about AD Users ??
 Originally Posted by L1nuxVb
Well , searching around i found something that worked
VB Code:
Dim conn As New ADODB.Connection
Dim strRS As String
Dim RS As ADODB.Recordset
Dim strconn As String
Private Sub Form_Load()
'Set Conn = Server.CreateObject("ADODB.Connection")
'Set RS = Server.CreateObject("ADODB.Recordset")
'Conn.Provider = "ADsDSOObject"
'strconn = "Active Directory Provider"
conn.Open _
"Data Source=Active Directory Provider;Provider=ADsDSOObject"
strRS = "SELECT name, mail FROM 'LDAP://head.com' WHERE objectClass = 'user' "
Set RS = conn.Execute(strRS)
While RS.EOF = False
MsgBox ("Name: " & RS("name") & " ,e-mail: " & RS("mail"))
RS.MoveNext
Wend
End Sub
Hi L1nuxVb tks for share!
I am a newbie, sure....
Have idea if existis a list of complete object to retrive other info from LDAP query.?
You know only Name and Mail?
Tks from Italy.
Sal.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|