G
Guest
hi
I have a query to a LDAP directory which is supposed to get a list of records to be displayed in an ASP.NET page
There is not many of them, almost 3 dozen. But the query is rather long, too long for a web page indeed
Is there a way to optimize such queries
Thank
Here what I'm doing
ldsSearch = New DirectorySearcher(deEntry
ldsSearch.SearchScope = SearchScope.OneLeve
dtTemp = New DataTable(
dtTemp.Columns.Add(New System.Data.DataColumn("code")
dtTemp.Columns.Add(New System.Data.DataColumn("name")
ldsSearch.Filter = "(&(tdvOrganizationType=" & strFiltre & ")(|(cn=A*)(cn=B*)))
ldsSearch.PropertiesToLoad.Add("cn"
srResults = ldsSearch.FindAl
For Each srResult In srResult
row = dtTemp.NewRo
row("code") = srResult.GetDirectoryEntry.Properties.Item("cn").Valu
row("nom") = URLDecode(row("code")
dtTemp.Rows.Add(row
Nex
'Sortin
rowTransfert = dtTemp.Select("", "code ASC"
dtTemp.Dispose(
dtSortie = New DataTable(
dtSortie.Columns.Add(New System.Data.DataColumn("code")
dtSortie.Columns.Add(New System.Data.DataColumn("name")
For Each row In rowTransfer
dtSortie.ImportRow(row
Nex
row = Nothin
rowTransfert = Nothin
srResults = Nothin
ldsSearch.Dispose(
Return (dtSortie)
I have a query to a LDAP directory which is supposed to get a list of records to be displayed in an ASP.NET page
There is not many of them, almost 3 dozen. But the query is rather long, too long for a web page indeed
Is there a way to optimize such queries
Thank
Here what I'm doing
ldsSearch = New DirectorySearcher(deEntry
ldsSearch.SearchScope = SearchScope.OneLeve
dtTemp = New DataTable(
dtTemp.Columns.Add(New System.Data.DataColumn("code")
dtTemp.Columns.Add(New System.Data.DataColumn("name")
ldsSearch.Filter = "(&(tdvOrganizationType=" & strFiltre & ")(|(cn=A*)(cn=B*)))
ldsSearch.PropertiesToLoad.Add("cn"
srResults = ldsSearch.FindAl
For Each srResult In srResult
row = dtTemp.NewRo
row("code") = srResult.GetDirectoryEntry.Properties.Item("cn").Valu
row("nom") = URLDecode(row("code")
dtTemp.Rows.Add(row
Nex
'Sortin
rowTransfert = dtTemp.Select("", "code ASC"
dtTemp.Dispose(
dtSortie = New DataTable(
dtSortie.Columns.Add(New System.Data.DataColumn("code")
dtSortie.Columns.Add(New System.Data.DataColumn("name")
For Each row In rowTransfer
dtSortie.ImportRow(row
Nex
row = Nothin
rowTransfert = Nothin
srResults = Nothin
ldsSearch.Dispose(
Return (dtSortie)