LDAP query return limitation

G

gjb

Hi,

We have a Novell directory services hub that connects to our various
Exchange/AD systems via dirxml drivers to cross-populate all the GALs. There
are problems when doing certain functions which use LDAP queries to AD which
have more than 1000 items returned. The Novell drivers just give up or die.
I am no AD or Database expert, but find it hard to believe that the either
the query cannot be formulated to return all say 25000 items in iterative
chunks of 1000 or the that the driver cannot be written to overcome this.
This is surely fundamental database retrieval technogy.
Can someone throw some light on this as I am under pressure to "fix" the AD
while it appears to me that the shortcoming is elsewhere.

Regards,

GJB

PS I know I can use ntdsutil to raise the default return but I feel that
should not be necessary.
 
G

Guest

G, AD gives a return of 1000 records as a default maximum unless you do
something like below...
---------------------------------------------------
' Connect using ADSI OLE DB
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"

Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection

objCommand.CommandText = _

"<LDAP://ou=Users,ou=ENTERNAMEHERE,dc=emea,dc=ENTERCOMPANYHERE,dc=com>;(objectCategory=Person);DistinguishedName,name,ADSPath,LastLogin,LastLogoff;subtree"
objCommand.Properties("Page size") = 100

Set objRecordSet = objCommand.Execute
------------------------------------------------------
The interesting bit for you is >> objCommand.Properties("Page size") = 100
Without this you'll only get 1000 results...

HTH
Richard
 
J

Joe Richards [MVP]

Any result sets over 1000 need to be handled through paged queries, this is a
pretty well known LDAP concept.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top