I have a database with a size field in it. That field contains both the single-quote (') and the pound sign (#). I have a search form set up and it works properly with one exception. Whenever I use the # sign, it appears that the query doesn't recognize it. No error is generated and no records are found. The # sign can be located anywhere in the field e.g. #5 or 5-6#
I have tried many variations on the SQL statement with no luck. Here are a couple of my attempts.
...AND Size LIKE '%::Size::%')"
...AND Size LIKE '%Size%')"
The SQL manual that I have gives an example of escaping a character using the ESCAPE clause in the SQL statement e.g.
...AND Size LIKE '%Size%' ESCAPE '#')"
This produces a syntax error and I am assuming that my IIS server doesn't recognize the ESCAPE keyword.
Any thoughts?
I have tried many variations on the SQL statement with no luck. Here are a couple of my attempts.
...AND Size LIKE '%::Size::%')"
...AND Size LIKE '%Size%')"
The SQL manual that I have gives an example of escaping a character using the ESCAPE clause in the SQL statement e.g.
...AND Size LIKE '%Size%' ESCAPE '#')"
This produces a syntax error and I am assuming that my IIS server doesn't recognize the ESCAPE keyword.
Any thoughts?