Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003

    Unanswered: Apostrophe Usage

    Ok, I still have some uncertainty as to just exactly how this whole apostrophe thing works with databases. I understand that it is a reserved character and so when a sql query runs into one of these creatures it looks at it as something other than a normal character.

    I am working primarily in vb/asp/sql server with a little bit of access. I am familiar with the instrinsic 'Replace' function and I use it but I still have occassional problems.

    I would like any information I can get on just exactly why/how this thing works and how to work-around the apostrophe when writing to, reading from, and validating data from sql server/access/any databases.


  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    why/how it works: it is designated as the string delimiter

    work-around: code two of them in a row inside a string to get one

    example: insert into people (surname) values ( 'O''Toole' ) | @rudydotca
    Buy my SitePoint book: Simply 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