If this sentence:
Homer Simpson said, "Maybe, just once, someone will call me 'Sir' without adding 'you're making a scene'."
Is to appear as a literal string in your C++ code (as in your example) then you must escape the embedded double quotes:
QString str1
="Homer Simpson said, \"Maybe, just once, someone will call me 'Sir' without adding 'you're making a scene'.\"";
QString str1 ="Homer Simpson said, \"Maybe, just once, someone will call me 'Sir' without adding 'you're making a scene'.\"";
To copy to clipboard, switch view to plain text mode
This is before you do what anda_skoa suggests and use parameter binding to do the SQL insert safely.
Bookmarks