c# - Recordset only returning 1000 records -


I'm doing an ADODB recordset.open () command with an LDAP query that will allow all the users from my Active Directory Receives.

There are about 2,600 users in this, but I'm only getting 1000 returns.

I have tried to change the PageSize and MaxRecords properties without any destiny recorded archives.

Without external content, the code looks the same (I have made the connection details generic):

  ADODB.Connection conn = new ADODB.Connection (); ADODB.Recordset RS = new ADODB.Recordset (); Rsmaxrecords = 10000; Rs.PageSize = 10000; Conn.Open ("Active Directory Provider", "", "", 0); String query = "select from CD" LDAP: // OU = user accounts, OU = topleval, DC = domain name, DC = local 'where samAccountName =' * '"rs.Open (query, conn, ADODB.CursorTypeEnum.adOpenKeyset , ADODB.LockTypeEnum.adLockOptimistic, -1);  

It's definitely returning 1,000 records only, (I've confirmed), and I can use them properly .

If this helps, then the reason is not using DirectorySearcher because it is so slow compared to this .

You must set the page size on the connection, not on Recordset

Ref:


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -