Instead of one apostraophe in the value of the skunumb, use two:
Instead of Tim's, use Tim''s.
Whenever input comes from a user, it must be validated. Process the input to handle any invalid or improper characters. Also, if a command returns an exception, it needs to be handled. The exception (the error message) will indicate what the problem is.
A quote in a variable might or might not need to be doubled up. If it's simply one character in a string of characters, then that's all it needs to be. But if the string is to be handled as a quoted string, then each quote in the string needs to be doubled.
The doubling acts as an escape character so that the quote in the string isn't interpreted as being the end of the string.
Last Wiki Answer Submitted: January 2, 2010 1:09 am by TomLiotta110,155 pts.
All Answer Wiki Contributors: TomLiotta110,155 pts.