PDA

View Full Version : Odd - Response Buffer Limit Exceeded


zenweezil
12-06-2005, 11:30 PM
I have a search on a shopping cart that works fine - except when you search for an exact part number such as "M014202" you get a "Response Buffer Limit Exceeded" error.

It only errors when you use a correct part number otherwise it goes through fine - so following my example above M014202 would cause an error but M014201 would correctly return "No Matches Found"

Anyways, here is how I assign the search words that are passed via the url to the results page:

searchwords = Request.QueryString("search")

And here is the SQL I use to produce the search results:

rsResults.Source = "SELECT * FROM dbo.T_Parts WHERE Name LIKE '%" + Replace(searchwords, "'", "''") + "%' OR ID = '" + Replace(searchwords, "'", "''") + "'"

Thoughts anyone?

Roelf
12-07-2005, 08:11 AM
Try to execute the query with a correct id directly in the database, see if a lot of records return...

Buffer limit exceeded is an error which occurs when output is buffered and there is too much output to hold.
You can also call Response.Flush occasionally, but i think the problem is in the query...

Have you done a response.write of the complete query, which is sent to the database??

zenweezil
12-07-2005, 02:22 PM
I figured it out.

I was looking at the wrong sql since there was two possible sqls - one if it matched a special pricing and another if it was standard pricing.

The special pricing was a much larger query tapping into several databases and I just needed to wrap parenthese around the last part of the query with the OR command so it limited what portion of the statement the OR pertained to.

anyways, thanks for the help.