Using special signs in SQL queries

Results 1 to 3 of 3

Thread: Using special signs in SQL queries

  1. #1
    Join Date
    Dec 1969
    Posts
    27

    Default Using special signs in SQL queries

    i know there&#039s probably a really easy answer to this but i&#039m wondering how to solve the problem of inserting data which contains characters like &#039 and & into an Access database, for example the name "William&#039s & Co". if i use <BR>"insert into input (name) values &#039" & request.form("name") & "&#039" <BR>i get an error and i don&#039t feel like replacing all those characters once before the insert and then a second time in the database itself back to its original value.<BR>thanks<BR>nicolas

  2. #2
    Vikas Nigam Guest

    Default RE: Using special signs in SQL queries

    I guess the replace is only solution:<BR><BR>U can replace &#039 with `<BR>ie a forward appostrophe(&#039) with a reverse appostrophe(`) U before storing and neednt replace it back to original on retreval tron Database.

  3. #3
    Ger O'Sullivan Guest

    Default RE: Using special signs in SQL queries

    Actually, replaceing &#039 with &#039&#039 is better...<BR>The SQL string knows you mean &#039 so it reconverts the double &#039 when accessing the database!!<BR>Regards,<BR>Ger.<BR>gosullivan@intui tionpublishing.com

Posting Permissions

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