Quotes in SQL (Those Darn Things!) Page 2

corner.jpg (739 bytes) Quotes in SQL (Those Darn Things!) corner2.jpg (786 bytes)

Back to the article: Click here

Please enter a string that contains single quotes in the text box below. Normal output will display the string without the function described on the previous page. Modified output runs the string through the function and adds single quotes as needed.

Dim strQuery
Dim strTextBox
strTextBox = request.form("strTown")
strQuery = "SELECT * FROM table WHERE town='" & strQuery & "';"

OUTPUT: <%=strOutput%>

This article was originally published on Aug 10, 1999
Page 2 of 2

Thanks for your registration, follow us on our social networks to keep up-to-date