Monday, February 13, 2012

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.

Thanks!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' )

No comments:

Post a Comment