locked
Help with insert statement and CkEditor RRS feed

  • Question

  • User561780282 posted

    I am using CkEditor to create a Microsoft word like affect.  However, I format a sentence before I sent out an email, it display the text and html code rather than format it as expected. Also, if I try to enter a text that has single quote into my database, it gives me an error “Incorrect syntax near 's'. Unclosed quotation mark after the character string

    Friday, May 14, 2010 2:37 PM

Answers

  • User-1790381586 posted

    Before inserting the markup to the database column make sure that all single quote marks(‘) are replaced by double quote mark(“).

    Single quote (‘) is treated as start and termination points of text.

    Try  -

    strData.Replace('\'','\"');

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 14, 2010 2:56 PM
  • User561780282 posted

    Thanks...I will replace the single quote with double quote. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 15, 2010 11:53 AM

All replies

  • User-1790381586 posted

    Before inserting the markup to the database column make sure that all single quote marks(‘) are replaced by double quote mark(“).

    Single quote (‘) is treated as start and termination points of text.

    Try  -

    strData.Replace('\'','\"');

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 14, 2010 2:56 PM
  • User561780282 posted

    Thanks...I will replace the single quote with double quote. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 15, 2010 11:53 AM