Determine wether a container has content

  • Thread starter Thread starter Uwe Kühne
  • Start date Start date
U

Uwe Kühne

Hi NG,

I'm just programming with ADSI and Visual Basic.
Is there a way to determine wether a container has content or not?
Why I want to do that?
Well, I display my AD-Hierarchy in a TreeView. If a container has
sub-elements (other ou's, users, etc.) I want to add a node to display this.
If it is empty, I don't want to add a node.
And I don't want to use ADO and a statement to count the elements, I think
that's quite slow!

I thank you for your help and send greetings from Germany,


Uwe kühne
 
You will have to do a query with the container as the base. I would recommend
only returning DN (or adspath). If you get anything returned you know you need
to add a node. Not until someone clicks on it do you have to go through and
figure out how many entries there are.

joe
 
Back
Top