Hi Julian
For a DBWPRichText the property AsString doesn't work properly. Copying to a WPRichText, images are lost. Copying from a WPRichText, the text is correctly copied but it's not updated when saved. It Works find with WPTools 4.
Thank you.
Hi Julian
For a DBWPRichText the property AsString doesn't work properly. Copying to a WPRichText, images are lost. Copying from a WPRichText, the text is correctly copied but it's not updated when saved. It Works find with WPTools 4.
Thank you.
Hi Julian,
With version 5.18.1, images aren't lost anymore, but still the DBWPRichText copied from a WPRichTest is not saved.
thank you.
The loszt images had to do with the write format, I am now using 'RTF-nobinary' as default since many database don't like the binary.
The copy&paste problem I cannot see. Maybe you can add code to the BeforePaste event: DBWPRichText.SaveChanging;
Julian
Hi Julian,
Sorry if I didn't explain myself clearly. The problem was not with copy/paste but with DBWPRichText.AsString := WPRichTExt.AsString. The modified text is correctly displayed but when posted the original text returns. But DBWPRichText.SaveChanging effectively solved the problem!
Thank you.
Hi,
unless you want to display the text at once better use
Field.AsString := WPRichText.AsANSIString('RTF-nobinary');
thats far more effective.
Julian
Just want to say that I've fallen over this too. The interesting thing is that it is the read that is failing, not the write. I was saving the binary data just fine, but restoring it fails in the parser. It may be worth looking at at some point as the parser must be failing at zeros or something.
Matthew
Actually, having found my RTF data went from 200k to 750k due to this change, I really think this would be an excellent thing to look at sometime!
Matthew
Hi,
Please make sure you write to a database BLOB (not MEMO) field. Some databases do not allow the $0 bytes in the text data and will truncate there.
Julian