Quotes in SQL (Those Darn Things!) Page 2

By ServerWatch Staff (Send Email)
Posted Aug 10, 1999

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

Page 2 of 2

Comment and Contribute

Your name/nickname

Your email

(Maximum characters: 1200). You have characters left.



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