single quote in sql

Results 1 to 2 of 2

Thread: single quote in sql

  1. #1
    Join Date
    Dec 1969

    Default single quote in sql

    I know this question is in the faq but im having a problem still.<BR>Here is what I have:<BR><BR>siteName = replace(trim(request("siteName")),SQLQT,SQLQT & SQLQT )<BR>siteName = SQLQT & siteName & SQLQT<BR>sql = "SELECT * FROM links WHERE siteName=" & siteName<BR>, objConn<BR><BR>&#039;and when I response.write the sql<BR>SELECT * FROM links WHERE siteName=&#039;A Writer&#039;<BR><BR>the actual name of the site is &#039;A Writer&#039;s Page&#039;<BR>So as is the above code is in vain, what am I doing wrong?

  2. #2
    Join Date
    Dec 1969

    Default RE: single quote in sql

    Have you tried it another way?<BR>Remove the line siteName = SQLQT * siteName & SQLQT and replace the line below with<BR>sql = "SELECT * FROM links WHERE siteName = &#039;" & siteName & "&#039;"<BR>See what that does.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts