Link to home
Start Free TrialLog in
Avatar of JordansGhost
JordansGhost

asked on

Size Limit Exceeded Error

I am using ADO to return records from AD when I reach 2500 records in the recordset I get the error

Provider error '80072023'

The size limit for this request was exceeded.

/adsitest/sendwarnings.asp, line 59


Line 59 is the "WEND" part of the following statement.

WHILE NOT adoRecordSet.EOF
                  IF adoRecordSet.Fields(0).Type = 12 THEN
                  For Each sLine In adoRecordSet.Fields(0).Value
                  email = email & sLine
                  Next
                  ELSE
                  email = adoRecordSet.Fields(0).Value
                  END IF
                  IF adoRecordSet.Fields(1).Type = 12 THEN
                  For Each sLine In adoRecordSet.Fields(1).Value
                  lanid = lanid & sLine
                  Next
                  ELSE
                  lanid = adoRecordSet.Fields(1).Value
                  END IF
                  
                  Response.Write (i & ") Email = " & email & " - LANID = " & lanid & "<BR>")
                  i = i + 1
                        'SQLTest = "SELECT * FROM GALCTDTIDYwarnings WHERE smtp = '" & email & "' AND lanid = '" & lanid & "'"
                        'SET RS = cckbconn.Execute(SQLTest)
                        '
                        'IF NOT RS.EOF THEN
                              ' Already listed this user, ignore them
                        'ELSE
                        'cckbconn.Execute ("INSERT INTO GALCTDTIDYwarnings (smtp,lanid,warning) VALUES ('" & email & "','" & lanid & "',0)")
                        'END IF
                        
                        'RS.Close
                        'SET RS = Nothing
                  adoRecordSet.MoveNext
                  WEND
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

I have found few references to this error and no real solutions (except to use db paging which may not be appropriate for you).

Do you have the latest MDAC installed?

Fritz the Blank
Avatar of JordansGhost
JordansGhost

ASKER

well I have 2.71 not quite the latest but should be good enough. How do I use paging?

Might sound stupid but in 2.5 years coding i have never had a use for it before.
Here is an example for you:

http://www.asp101.com/samples/db_paging.asp

The code is provided by a link there as well.

Fritz the Blank
just tried this. Didnt work so I thought ok Ill set the .MaxRecords property to 2000 and see what happens.It outputs 2500 anyway....
SOLUTION
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ill try that and see what happens. To let you into what im doing I am using ADo to connect to Active directory through ADSI and return a recordset of all the users sAMAccountName and MAIL attributes where extensionattribute7 is set to "PLEASE COMPLETE"

There should be about 3500 of them.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I ended up using an extra filter to make the recordset smaller i think was to do with the amount of records being returned from AD