Ask a Question related to ASP.NET General, Design and Development.
-
cameron #1
DirectorySearcher & sorting
I would like to do a search and have the results sorted by property 1
and then by property 2. My first thought had been
//set up the searching object and call it oSearch
oSearch.Sort.PropertyName = "Property1,Proptery2";
but that was unhappy. I can do a
oSearch.Sort.PropertyName = "Property1";
or
oSearch.Sort.PropertyName = "Property2";
without issue but I can not figure out how to do what I need. I took a
look at the System.DirectoryServices.SortOption and it doesn't seem to
do anything new either. I am dealing with a fairly large result set so I
REALLY do not want to have to do a sort myself after I get the results.
Thanks.
-Cam
cameron Guest
-
Sorting array vs sorting paginated array
....pulling in a long list of photos in a gallery, and I have a sort function working within the pages of data fine. I need to bring it back out of... -
sorting
Gary, Please repost WITHOUT the attachment. Many of us use dialup and downloading 1433 lines wastes a lot of our time - especially since very... -
DirectorySearcher - SearchResult - User Groups
Hi, I'm having trouble fetching the AD groups a user belongs to after authenticating them against Active Directory. My code is based on the How To... -
Perplexing DirectorySearcher error
Hi, This seems strange to me and was wondering if anyone had any insight as to why this fails (for users not on the machine) when the ou is... -
Sorting in CGI
Hi, I am writing a form that will list the name in the file namedata.dat in alphabetical order and display in a web page. #!/usr/bin/perl use... -
David Waz... #2
Re: DirectorySearcher & sorting
If you move the content into a DataTable, your first method would work.
o_Table.DefaultView.SortExpression="Prop1, Prop2"
Then use the datatable as the source of your data.
"Willy Denoyette [MVP]" <willy.denoyette@skynet.be> wrote in message
news:ex$jzhlQDHA.560@TK2MSFTNGP10.phx.gbl...news:3F05BA20.2070706@appdepot.com...> This is not possible, Active Directory supports only a single sort key.
>
> Willy.
>
> "cameron" <cameron.charlebois@appdepot.com> wrote in message>> > I would like to do a search and have the results sorted by property 1
> > and then by property 2. My first thought had been
> >
> > //set up the searching object and call it oSearch
> > oSearch.Sort.PropertyName = "Property1,Proptery2";
> >
> > but that was unhappy. I can do a
> > oSearch.Sort.PropertyName = "Property1";
> > or
> > oSearch.Sort.PropertyName = "Property2";
> > without issue but I can not figure out how to do what I need. I took a
> > look at the System.DirectoryServices.SortOption and it doesn't seem to
> > do anything new either. I am dealing with a fairly large result set so I
> > REALLY do not want to have to do a sort myself after I get the results.
> >
> > Thanks.
> >
> > -Cam
> >
>
>
David Waz... Guest
-
cameron #3
Re: DirectorySearcher & sorting
Move the content? Copy the actual data from AD to a SQL table? Wouldn't
that be nasty expensive to do whenever I needed to search? Or is there a
way to access the underlaying Database object?
-Cam
David Waz... wrote:> If you move the content into a DataTable, your first method would work.
> o_Table.DefaultView.SortExpression="Prop1, Prop2"
>
> Then use the datatable as the source of your data.
>
>
>
> "Willy Denoyette [MVP]" <willy.denoyette@skynet.be> wrote in message
> news:ex$jzhlQDHA.560@TK2MSFTNGP10.phx.gbl...
>>>>This is not possible, Active Directory supports only a single sort key.
>>
>>Willy.
>>
>>"cameron" <cameron.charlebois@appdepot.com> wrote in message
> news:3F05BA20.2070706@appdepot.com...
>>>>>>>I would like to do a search and have the results sorted by property 1
>>>and then by property 2. My first thought had been
>>>
>>>//set up the searching object and call it oSearch
>>>oSearch.Sort.PropertyName = "Property1,Proptery2";
>>>
>>>but that was unhappy. I can do a
>>>oSearch.Sort.PropertyName = "Property1";
>>>or
>>>oSearch.Sort.PropertyName = "Property2";
>>>without issue but I can not figure out how to do what I need. I took a
>>>look at the System.DirectoryServices.SortOption and it doesn't seem to
>>>do anything new either. I am dealing with a fairly large result set so I
>>>REALLY do not want to have to do a sort myself after I get the results.
>>>
>>>Thanks.
>>>
>>>-Cam
>>>
>>
>>
>
cameron Guest
-
Yan-Hong Huang[MSFT] #4
Re: DirectorySearcher & sorting
Hello Cam,
There is no need to copy all the AD data to SQL table? What we need to do
is to see whether it is possible to copy the search result into a dataset.
Please refer to [url]http://www.dotnet247.com/247reference/msgs/1/9450.aspx[/url].
Hope it helps.
Best regards,
yhhuang
VS.NET, Visual C++
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? [url]http://www.gotdotnet.com[/url]
--------------------
!Message-ID: <3F05E43E.4050600@appdepot.com>
!Date: Fri, 04 Jul 2003 14:31:58 -0600
!From: cameron <cameron.charlebois@appdepot.com>
!User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0)
Gecko/20020530
!X-Accept-Language: en-us, en
!MIME-Version: 1.0
!Subject: Re: DirectorySearcher & sorting
!References: <3F05BA20.2070706@appdepot.com>
<ex$jzhlQDHA.560@TK2MSFTNGP10.phx.gbl>
<q4lNa.870$Ld6.186@newssvr23.news.prodigy.com>
!Content-Type: text/plain; charset=us-ascii; format=flowed
!Content-Transfer-Encoding: 7bit
!Newsgroups:
microsoft.public.dotnet.languages.csharp,microsoft .public.dotnet.framework.a
spnet
!NNTP-Posting-Host: hssxrg64-201-211-159.sasknet.sk.ca 64.201.211.159
!Lines: 1
!Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
!Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.aspnet:32353
microsoft.public.dotnet.languages.csharp:30649
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!Move the content? Copy the actual data from AD to a SQL table? Wouldn't
!that be nasty expensive to do whenever I needed to search? Or is there a
!way to access the underlaying Database object?
!
!-Cam
!
!David Waz... wrote:
!> If you move the content into a DataTable, your first method would work.
!> o_Table.DefaultView.SortExpression="Prop1, Prop2"
!>
!> Then use the datatable as the source of your data.
!>
!>
!>
!> "Willy Denoyette [MVP]" <willy.denoyette@skynet.be> wrote in message
!> news:ex$jzhlQDHA.560@TK2MSFTNGP10.phx.gbl...
!>
!>>This is not possible, Active Directory supports only a single sort key.
!>>
!>>Willy.
!>>
!>>"cameron" <cameron.charlebois@appdepot.com> wrote in message
!>
!> news:3F05BA20.2070706@appdepot.com...
!>
!>>>I would like to do a search and have the results sorted by property 1
!>>>and then by property 2. My first thought had been
!>>>
!>>>//set up the searching object and call it oSearch
!>>>oSearch.Sort.PropertyName = "Property1,Proptery2";
!>>>
!>>>but that was unhappy. I can do a
!>>>oSearch.Sort.PropertyName = "Property1";
!>>>or
!>>>oSearch.Sort.PropertyName = "Property2";
!>>>without issue but I can not figure out how to do what I need. I took a
!>>>look at the System.DirectoryServices.SortOption and it doesn't seem to
!>>>do anything new either. I am dealing with a fairly large result set so I
!>>>REALLY do not want to have to do a sort myself after I get the results.
!>>>
!>>>Thanks.
!>>>
!>>>-Cam
!>>>
!>>
!>>
!>>
!>
!>
!
!
!
Yan-Hong Huang[MSFT] Guest



Reply With Quote

