If I insert a linked image with WPTools 5.13 using:
WPRichText_Cmt.InsertGraphicDialog( '*.bmp;*.jpg', true );
it seems to insert fine. However, if I then save the text to a database and reload it, all the text after and including the linked image is deleted. I looked at the resulting RTF, and it appears that the save operation did not write out everything... in fact, it only partially wrote the image link.
I am using Advantage Database, local server, and wrote the data using SQL as:
SQL.Add( Format( 'UPDATE ReportComments' +
' SET Comment = :memoData' +
', CheckboxesChecked = ''%s''' +
' WHERE ReportID = ''%s''' +
' AND CommentID = ''%s''',
[ cbCheckedList.Text,
curReport.ReportID,
curCommentID ] ) );
end;
ParamByName( 'memodata' ).DataType := ftMemo;
ParamByName( 'memoData' ).AsMemo := WPRichText_Cmt.AsString;
ExecSQL;
The tail end of the RTF looked like this:
\pard\plain\fs22\par
1\par
2\par
3\par
4\par
5{\*\wptools\wpomode0\wpoframe0{\bin186
Note however, that if I save it using WPRichText_Cmt.SaveToFile, the output is fine:
1\par
2\par
3\par
4\par
5{\*\wptools\wpomode0\wpoframe0{\bin190
TWPOImage TPF0 TWPOImage WidthTW$HeightTWlWriteRTFModewobBoth
StreamNameXC:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue hills.jpgObjTag }}\par
6\par
7\par
8\par
9\par
}}
Almost as if WPRichText_Cmt.AsString is not working properly, or AsMemo is not appropriate, yet it so far has seemed to work... until now.
Eric