Quotation Marks and Formatted Text
Posted: Thu Aug 01, 2013 6:01 pm
My ultimate question is: What code (and properties) allows users to save formatted text to a (SQLite) database?
Here are details:
I have a field where users might paste text from an office application. The field's contents are then inserted into a (SQLite) database field (of type text). Right now I create the SQL statement as just:
I get errors if my text (FieldScratchPad) contains quotation marks, because of how my SQL statement is written. I also get errors with most text pasted from other applications--whether I put the text, htmltext, or rtftext of field FieldScratchPad into the db.
Here are details:
I have a field where users might paste text from an office application. The field's contents are then inserted into a (SQLite) database field (of type text). Right now I create the SQL statement as just:
Code: Select all
put the label of button "ComboBoxStudent" of card "New Note" of stack "Grad Log" into aName
put the htmltext of field "FieldScratchPad" into aMemo
--the button contains a name, the field contains the text I want to post, student is the table's name
put "UPDATE student" && \
"SET scratchpad=""e&aMemo"e&& \
"WHERE name=""e&aName"e into tSQL