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).Typ e = 12 THEN
For Each sLine In adoRecordSet.Fields(0).Val ue
email = email & sLine
Next
ELSE
email = adoRecordSet.Fields(0).Val ue
END IF
IF adoRecordSet.Fields(1).Typ e = 12 THEN
For Each sLine In adoRecordSet.Fields(1).Val ue
lanid = lanid & sLine
Next
ELSE
lanid = adoRecordSet.Fields(1).Val ue
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
Provider error '80072023'
The size limit for this request was exceeded.
/adsitest/sendwarnings.asp
Line 59 is the "WEND" part of the following statement.
WHILE NOT adoRecordSet.EOF
IF adoRecordSet.Fields(0).Typ
For Each sLine In adoRecordSet.Fields(0).Val
email = email & sLine
Next
ELSE
email = adoRecordSet.Fields(0).Val
END IF
IF adoRecordSet.Fields(1).Typ
For Each sLine In adoRecordSet.Fields(1).Val
lanid = lanid & sLine
Next
ELSE
lanid = adoRecordSet.Fields(1).Val
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
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.
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
http://www.asp101.com/samples/db_paging.asp
The code is provided by a link there as well.
Fritz the Blank
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
There should be about 3500 of them.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
Do you have the latest MDAC installed?
Fritz the Blank