Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Nov 2007
    Posts
    682
    Thanks
    319
    Thanked 1 Time in 1 Post

    Uh? Response Buffer Limit Exceeded when retrieving 12 records...

    I'm getting the error: Response Buffer Limit Exceeded when trying to retreive 12 records from a database. Not had this before, any ideas?

    ASP
    Code:
    'Connect to database
    set conn=Server.CreateObject("ADODB.Connection")
    conn.Provider="Microsoft.ACE.OLEDB.12.0"
    conn.Open Server.MapPath("/nightclub_photography/data/database/jamsnaps.mdb")
    
    'Get the current date
    today = ISODate(Request.Cookies("sdate") & " 00:00:00")
    
    sql = "SELECT * FROM sales WHERE DATEVALUE(saleDate) = " & today & " AND printed = 0"
    
    Set rs = conn.Execute(sql)
    
    if rs.EOF then
    	response.write "No sales found!"
    else
    	do until rs.EOF
    		response.write rs("product")
    	loop
    end if
    
    rs.close
    conn.close

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,597
    Thanks
    80
    Thanked 4,498 Times in 4,462 Posts
    Ready to kick yourself? HARD?

    *WHERE* is your rs.MoveNext inside that DO loop?

    Without it, your code will response.write the first rs("product") an INFINITE number of times...well, at least until you exceed the buffer size.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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