Sql 6.5, Delphi and Text field

I am trying to find a good way of writing from a non data control memo field
to a SQL text field, using an UPDATE query on the client side. I can write
the text no problem, the problem comes with control characters such as tab
and newline which come from the text in something like the following format

'some random example text'$#A,$#D'will be continued on a new line'

obviously this gives 2 problems. 1 Delphi interprets this string incorrectly
as it contains the ' character. I can work around this by manipulating the
string, but I will then lose the control characters which the give the text
the formatting the user wants. Ideally I would like to keep this formatting.

Does anyone have any ideas?

Regards

Jason Farmer