Response Buffer Limit Exceeded??? - Posted (1675 Views)
DEV Team Forum Moderator
Da_Stimulator
Posts: 3373
3373
Hi, long time no see ppl

so... I'm writing a web app to show product listing, and I just added categories to that app.
I added this little chunk of code and it threw an error at me, Response buffer limit exceeded? never seen that one before, and I dont see any errors in my code, AND there is only ONE category in the database at the moment. Help?
Code:

set crs = Server.CreateObject("Adodb.RecordSet")
strsql = "SELECT Cat_Name, Cat_ID FROM P_Categories ORDER BY Cat_Name ASC"
crs.Open strsql, dbConn
if not(crs.eof) then
Do while not(crs.eof)
response.write("<option value=""" & crs("Cat_ID"))
if crs("Cat_ID") = strProductCat then
response.write(" SELECTED")
end if
response.write(""">" & formatString(crs("Cat_Name")) & "</option>")
Loop
else
response.write("<option value=""0"">No Categories Found!!!</option>")
end if
crs.close
set crs = nothing

I should note that the page worked flawlessly till I added that code ^^

*edit - Response.Buffer=False produced no error, however it also produced NO PAGE... no source, nothing. just a blank browser screen.
I commented out the added code with the same result... so now I dont even know if it's that code or what. The only other things I edited were a couple of SQL statements that shouldn't even be called the way the page is loading...
*edit again - ok I did a process of elimination and the code above IS whats causing the error...<
-Stim
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
Originally posted by AnonJr
Looks like it should be <option value="whatever" selected="selected"> based on http://www.w3schools.com/tags/att_option_selected.asp
<
Posted
Support Moderator
Shaggy
Posts: 6780
6780
Any attribute that didn't require a value in previous versions of HTML now requires a value of itself. For example:

selected="selected"
readonly="readonly"
disabled="disabled"

<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
DEV Team Forum Moderator
Da_Stimulator
Posts: 3373
3373
But... that dosn't work. (in firefox). selected="selected" does nothing.<
-Stim
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
Are you sure its being output correctly? I use it all the time and have no issues - not to mention its the w3c standard...<
Posted
Average Member
SiSL
Posts: 671
671
Originally posted by SiSL
In your case: crs("Cat_ID") = strProductCat, you can try cLng(crs("Cat_ID")) = cLng(strProductCat) or lcase(crs("Cat_ID")) = lcase(strProductCat)

I'm going to repeat that I guess... <
You Must enter a message