On Tue, 16 Mar 2004 09:56:22 -0600, "Mario Rodriguez" <(E-Mail Removed)> wrote:
¤ Hi people, there is a way to make searches on active directory thru
¤ ADO.NET?, so the result is an DataSet object and not a DirectoryENtry object
¤
You can use the native .NET OLEDB library with the ADsDSOObject provider
Function QueryActiveDirectory() As Boolean
Dim ADConnection As New System.Data.OleDb.OleDbConnection("Provider=ADsDSOObject;")
ADConnection.Open()
Dim da As New System.Data.OleDb.OleDbDataAdapter("select name, ADsPath from
'LDAP://DC=xxx,DC=xxx,DC=org' WHERE objectCategory='organizationalUnit' or objectCategory='group'",
ADConnection)
Dim ds As New DataSet
da.Fill(ds, "ADResults")
frmMain.DataGrid1.SetDataBinding(ds, "ADResults")
ADConnection.Close()
End Function
Paul ~~~
(E-Mail Removed)
Microsoft MVP (Visual Basic)