in reply to Escaping characters

Your problem probably is with the interpretation of the SQL command. If you are going to put this on to a web page you could try translating the quote character to '