Home All Groups Group Topic Archive Search About

Is there a limit to number record returned from AD serach to a dat

Author
29 Nov 2006 11:00 PM
Pucca
Hi, I'm using vs2005 and .net 2.0.  I was just told that Active Directory
will only return 1000 record (or something with page limit) when I do a query
select in my C# application.  The record is retrieve using fill to my
dataset's table.  Can someone verify if there is such a limit and how can
resolve this problem 
--
Thanks.

Author
1 Dec 2006 12:17 AM
Joe Kaplan
You need to use a paged search.  If you are using System.DirectoryServices,
set the PageSize on the DirectorySearcher to 1000 or less.

You have asked many questions on AD programming that would have been
answered easily by buying my book already (this is in ch 4).  :)

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
Show quoteHide quote
"Pucca" <Pu***@discussions.microsoft.com> wrote in message
news:2670EF65-79A1-4BE0-9373-52595967FDCB@microsoft.com...
> Hi, I'm using vs2005 and .net 2.0.  I was just told that Active Directory
> will only return 1000 record (or something with page limit) when I do a
> query
> select in my C# application.  The record is retrieve using fill to my
> dataset's table.  Can someone verify if there is such a limit and how can
> resolve this problem
> --
> Thanks.
Author
1 Dec 2006 12:37 AM
Pucca
Joe, I did buy your book already.  I didn't think this will be in your book. 
I thought it's more of a LDAP type of quesiton.  Next time I'll look up the
book first.  Thank you. 
--
Thanks.


Show quoteHide quote
"Joe Kaplan" wrote:

> You need to use a paged search.  If you are using System.DirectoryServices,
> set the PageSize on the DirectorySearcher to 1000 or less.
>
> You have asked many questions on AD programming that would have been
> answered easily by buying my book already (this is in ch 4).  :)
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services Programming"
> http://www.directoryprogramming.net
> --
> "Pucca" <Pu***@discussions.microsoft.com> wrote in message
> news:2670EF65-79A1-4BE0-9373-52595967FDCB@microsoft.com...
> > Hi, I'm using vs2005 and .net 2.0.  I was just told that Active Directory
> > will only return 1000 record (or something with page limit) when I do a
> > query
> > select in my C# application.  The record is retrieve using fill to my
> > dataset's table.  Can someone verify if there is such a limit and how can
> > resolve this problem
> > --
> > Thanks.
>
>
>
Author
1 Dec 2006 4:53 AM
Pucca
Hi Joe,

I looked up chapter 4 of your book and it's discussing DirectorySearcher. 
Yes, in it it does explain the paging search at listing 4.13.  I am using
query select statement in C# to fill table in a dataset.  I'm not using
DirectorySearcher.  Is the paging search limit still applicable in this case?
Thank you.
--
Thanks.


Show quoteHide quote
"Joe Kaplan" wrote:

> You need to use a paged search.  If you are using System.DirectoryServices,
> set the PageSize on the DirectorySearcher to 1000 or less.
>
> You have asked many questions on AD programming that would have been
> answered easily by buying my book already (this is in ch 4).  :)
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services Programming"
> http://www.directoryprogramming.net
> --
> "Pucca" <Pu***@discussions.microsoft.com> wrote in message
> news:2670EF65-79A1-4BE0-9373-52595967FDCB@microsoft.com...
> > Hi, I'm using vs2005 and .net 2.0.  I was just told that Active Directory
> > will only return 1000 record (or something with page limit) when I do a
> > query
> > select in my C# application.  The record is retrieve using fill to my
> > dataset's table.  Can someone verify if there is such a limit and how can
> > resolve this problem
> > --
> > Thanks.
>
>
>
Author
1 Dec 2006 3:02 PM
Joe Kaplan
Glad to hear you already have the book.  Sorry you didn't see the part on
paged searches there first.

Regarding using System.Data to search AD, why on earth would you do that
instead of using the DirectorySearcher?  The OLEDB stuff is much slower and
a great deal more "clunky" than using the DirectorySearcher.  I believe it
is possible to set the page size by setting a property on the connection
object called "Page Size".  That's how you do it in regular ADO via VBScript
and stuff.  I'm not sure how that translates to the .NET implementation
though.  I'd just use the DirectorySearcher though.  If you want a DataSet,
it is pretty easy to create a DataTable on the fly by parsing out the
results of the SearchResultCollection.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
Show quoteHide quote
"Pucca" <Pu***@discussions.microsoft.com> wrote in message
news:2D11A4A1-80DC-4740-A3BB-DBB1EC22DA4B@microsoft.com...
> Hi Joe,
>
> I looked up chapter 4 of your book and it's discussing DirectorySearcher.
> Yes, in it it does explain the paging search at listing 4.13.  I am using
> query select statement in C# to fill table in a dataset.  I'm not using
> DirectorySearcher.  Is the paging search limit still applicable in this
> case?
> Thank you.
> --
> Thanks.
>
>
> "Joe Kaplan" wrote:
>
>> You need to use a paged search.  If you are using
>> System.DirectoryServices,
>> set the PageSize on the DirectorySearcher to 1000 or less.
>>
>> You have asked many questions on AD programming that would have been
>> answered easily by buying my book already (this is in ch 4).  :)
>>
>> Joe K.
>>
>> --
>> Joe Kaplan-MS MVP Directory Services Programming
>> Co-author of "The .NET Developer's Guide to Directory Services
>> Programming"
>> http://www.directoryprogramming.net
>> --
>> "Pucca" <Pu***@discussions.microsoft.com> wrote in message
>> news:2670EF65-79A1-4BE0-9373-52595967FDCB@microsoft.com...
>> > Hi, I'm using vs2005 and .net 2.0.  I was just told that Active
>> > Directory
>> > will only return 1000 record (or something with page limit) when I do a
>> > query
>> > select in my C# application.  The record is retrieve using fill to my
>> > dataset's table.  Can someone verify if there is such a limit and how
>> > can
>> > resolve this problem
>> > --
>> > Thanks.
>>
>>
>>
Author
1 Dec 2006 11:48 PM
Pucca
I'm building the dataset and the datatablse to pass to Crystal Report for
report generation.  I didn't know that would be more expensice to do the sql
like query.  I'll look into translating the user input to DirectorySearcher. 
Thank you very much for the information.
--
Thanks.


Show quoteHide quote
"Joe Kaplan" wrote:

> Glad to hear you already have the book.  Sorry you didn't see the part on
> paged searches there first.
>
> Regarding using System.Data to search AD, why on earth would you do that
> instead of using the DirectorySearcher?  The OLEDB stuff is much slower and
> a great deal more "clunky" than using the DirectorySearcher.  I believe it
> is possible to set the page size by setting a property on the connection
> object called "Page Size".  That's how you do it in regular ADO via VBScript
> and stuff.  I'm not sure how that translates to the .NET implementation
> though.  I'd just use the DirectorySearcher though.  If you want a DataSet,
> it is pretty easy to create a DataTable on the fly by parsing out the
> results of the SearchResultCollection.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services Programming"
> http://www.directoryprogramming.net
> --
> "Pucca" <Pu***@discussions.microsoft.com> wrote in message
> news:2D11A4A1-80DC-4740-A3BB-DBB1EC22DA4B@microsoft.com...
> > Hi Joe,
> >
> > I looked up chapter 4 of your book and it's discussing DirectorySearcher.
> > Yes, in it it does explain the paging search at listing 4.13.  I am using
> > query select statement in C# to fill table in a dataset.  I'm not using
> > DirectorySearcher.  Is the paging search limit still applicable in this
> > case?
> > Thank you.
> > --
> > Thanks.
> >
> >
> > "Joe Kaplan" wrote:
> >
> >> You need to use a paged search.  If you are using
> >> System.DirectoryServices,
> >> set the PageSize on the DirectorySearcher to 1000 or less.
> >>
> >> You have asked many questions on AD programming that would have been
> >> answered easily by buying my book already (this is in ch 4).  :)
> >>
> >> Joe K.
> >>
> >> --
> >> Joe Kaplan-MS MVP Directory Services Programming
> >> Co-author of "The .NET Developer's Guide to Directory Services
> >> Programming"
> >> http://www.directoryprogramming.net
> >> --
> >> "Pucca" <Pu***@discussions.microsoft.com> wrote in message
> >> news:2670EF65-79A1-4BE0-9373-52595967FDCB@microsoft.com...
> >> > Hi, I'm using vs2005 and .net 2.0.  I was just told that Active
> >> > Directory
> >> > will only return 1000 record (or something with page limit) when I do a
> >> > query
> >> > select in my C# application.  The record is retrieve using fill to my
> >> > dataset's table.  Can someone verify if there is such a limit and how
> >> > can
> >> > resolve this problem
> >> > --
> >> > Thanks.
> >>
> >>
> >>
>
>
>