Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,457
    Thanks
    15
    Thanked 0 Times in 0 Posts

    replace quotation marks

    I am trying to replace all " to a ' so I can put an sql into a form.
    my current code is
    sql=replace(sql,""","'") but this is not working.
    What am I doing wrong?

  • #2
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use an editor with Syntax Highlighting so you know when your strings are correct.

    Code:
    <%
    sql = "Hello ""World"""
    Response.Write sql
    Response.Write "<br>"
    
    sql=replace(sql,"""","'") 
    Response.Write sql
    %>


  •  

    Posting Permissions

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