Re: listing Object properties from SearchResult
From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 05/13/05
- Next message: Joe Kaplan \(MVP - ADSI\): "Re: Custom authentication"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: form authetication?"
- In reply to: dl: "listing Object properties from SearchResult"
- Next in thread: dl: "Re: listing Object properties from SearchResult"
- Reply: dl: "Re: listing Object properties from SearchResult"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 13 May 2005 09:17:47 -0500
What did you put in to PropertiesToLoad? Also, it is possible that the
security context you bound with only has rights to see a subset of the
properties you requested.
Those are my two best guesses given what you've told us.
Joe K.
<dl> wrote in message news:OCHzJf4VFHA.1148@tk2msftngp13.phx.gbl...
> Hi
> I have the following lines of code that are suppose to list some selected
> properties of all the object entries in a SearchResult but the code is
> only
> listing one property ie. the 'sn' and the corresponding value for all the
> entries, do you have a clue why?
> TIA
> ----------------------
> foreach (SearchResult resEnt in resEntAll)
> {
> i++;
> dr = dt.NewRow();
> foreach (string propKy in resEnt.Properties.PropertyNames)
> {
> switch (propKy)
> {
> case "sn":
> y = 0;
> break;
> case "givenName":
> y = 1;
> break;
> case "telephoneNumber":
> y = 2;
> break;
> default:
> y = 3;
> break;
> }
> if (y < 3)
> {
> ResultPropertyValueCollection valco =
> resEnt.Properties[propKy];
> foreach (Object prop in valco)
> {
> dr[y] = prop.ToString();
> }
> }
> }
> dt.Rows.Add(dr);
> }
>
> --
>
>
>
- Next message: Joe Kaplan \(MVP - ADSI\): "Re: Custom authentication"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: form authetication?"
- In reply to: dl: "listing Object properties from SearchResult"
- Next in thread: dl: "Re: listing Object properties from SearchResult"
- Reply: dl: "Re: listing Object properties from SearchResult"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|