Bart
Wed Jun 22 14:31:24 CDT 2005
Thanks, that was exactly what I needed. And thanks for the links too.
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:%23oqutz1dFHA.1456@TK2MSFTNGP15.phx.gbl...
> Bart Perrier wrote:
>
> > Is there a limitation with an ADO RecordSet in vbScript? It
> > seems as though every variation I try (results greater than
> > 1000) totals 1000; even the 'recordSet.RecordCount'.
> Hi,
>
> For ADO, setting the "Page Size" to something *smaller* than 1000
> should solve the problem (for Exchange the should be less than 100)
> because you then will get a paged search. If you set the page limit to
> a value larger then the max value (as well as equal?), ADO will only
> return the max values (a.k.a. 1000, or 1500 on Windows 2003 servers)
>
> A paged search is transparent to your application because ADSI
> automatically continues to retrieve additional pages of results until
> it reaches the end of the result set.
>
> Setting the page size to e.g. 99 will give you all results when using
> a ADO search against both AD and Exchange.
>
> oCommand.Properties("Page Size") = 99
>
>
> See links below for more information:
>
> Searching With ActiveX Data Objects
>
http://msdn.microsoft.com/library/en-us/adsi/adsi/searching_with_activex_data_objects_ado.asp
>
> Retrieving Large Results Sets
>
http://msdn.microsoft.com/library/en-us/adsi/adsi/retrieving_large_results_sets.asp
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
>
http://www.microsoft.com/technet/scriptcenter/default.mspx