E
Eric
Hi,
After I retrieved data from my companies AD, done in less then 1 sec, I want
to read that data into a dataset.
I do that with:
Dim cn() As Object
For Each src As SearchResult In sr
rw = dsData.Tables("managers").NewRow
If src.GetDirectoryEntry().Properties("cn").Value IsNot Nothing Then
cn = src.GetDirectoryEntry.Properties("cn").Value
rw("fullname") = cn(1).ToString
End If
If src.GetDirectoryEntry().Properties("mail").Value IsNot Nothing Then
rw("email") =
src.GetDirectoryEntry().Properties("mail").Value.ToString
End If
dsData.Tables("managers").Rows.Add(rw)
Next
Catch ex As Exception
Me.txtLijst.Text = ex.Message
End Try
It takes up to 20 seconds to read this information from the searchresults
and it's only 21 names.
How can I speed this up?
rg,
Eric
After I retrieved data from my companies AD, done in less then 1 sec, I want
to read that data into a dataset.
I do that with:
Dim cn() As Object
For Each src As SearchResult In sr
rw = dsData.Tables("managers").NewRow
If src.GetDirectoryEntry().Properties("cn").Value IsNot Nothing Then
cn = src.GetDirectoryEntry.Properties("cn").Value
rw("fullname") = cn(1).ToString
End If
If src.GetDirectoryEntry().Properties("mail").Value IsNot Nothing Then
rw("email") =
src.GetDirectoryEntry().Properties("mail").Value.ToString
End If
dsData.Tables("managers").Rows.Add(rw)
Next
Catch ex As Exception
Me.txtLijst.Text = ex.Message
End Try
It takes up to 20 seconds to read this information from the searchresults
and it's only 21 names.
How can I speed this up?
rg,
Eric