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?
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?