Passing single quotes

Results 1 to 2 of 2

Thread: Passing single quotes

  1. #1
    Tony Cimorelli Guest

    Default Passing single quotes

    I am trying to pass a single quote into an asp that queries an access database.<BR>I can see the single quote (SQ) coming through, but the SQL statement truncates it. example is L&#039aqua<BR>This is passed:<BR>/like_steamer_b.asp?Steamer=L%27Aqua - passed via the get<BR><BR>SQL statement:<BR> sql = "SELECT [Steamer], [Arrival], [Port] FROM filename WHERE Steamer like &#039%" & Request.QueryString("Steamer") & "&#039 "<BR><BR>The database values contain "L&#039aqua" with the SQ.<BR><BR>Is there a way to pass the value?<BR><BR>Thanks.<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Passing single quotes

    Yes, this is a common problem, but there is an easy workaround. See:<BR><BR>How to Deal with Appostrophes in your SQL String<BR>http://www.4guysfromrolla.com/webtech/051899-1.shtml<BR><BR>Happy Programming!

Posting Permissions

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