LDAP Query to limit number of rows

Results 1 to 2 of 2

Thread: LDAP Query to limit number of rows

  1. #1
    Gary Graber Guest

    Default LDAP Query to limit number of rows

    I have a question regarding usage of an LDAP data base that I am connecting to using ADSI. I am trying to limit the number of records that are returned to my record set object at the conclusion of an sql query. I have tried various commands such as:<BR>SELECT top 100 cn, From ...<BR>SELECT cn From sADsPath WHERE rownum &#060; 100 AND cn = &#039; " & find_name " *&#039;<BR>etc.<BR>but none of these seem to work. I am getting a provider error 80040e14.<BR>Could you tell me what the correct sql statement is so that I can place a limit on the number of records returned to my ADO object.<BR><BR>Any help in this matter would be greatly appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: LDAP Query to limit number of rows

    How about specifying the maximum number of records through the "maxRecords" property of ADODB.RecordSet?<BR><BR>The docs *claim* that doing so will "limit the number of records that the *provider* [which is what you want!] returns from the data source." I&#039;ve never had an occasion to use it in this way, but...<BR><BR>http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/dasdk/mdap8kxf.htm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts