Page 1 of 1

HTML Importer and DBRichViewEdit

Posted: Wed Sep 27, 2006 2:31 pm
by DevDude2006
Hi there.

I am trying to use the DBRichViewEdit to convert HTML documents to RTF documents, and am using the HTML Importer to do that.

I have a small problem though.
- I connect the DBRichViewEdit to the database field and put the underlying dataset in edit mode.
- I run the LoadHtml(MyString), and Format, and everything looks fine in DBRichViewEdit.
- When I issue a Post command to the underlying dataset, I get a NULL value in the database.

When I do the same, but also insert a character from the keyboard, and then Post, everything works just fine.

How can poste the imported HTML document without having to manually insert a character?

DevDude2006

Posted: Wed Sep 27, 2006 6:44 pm
by Sergey Tkachenko

Code: Select all

if DBRichViewEdit1.CanChange then begin
  <load HTML here>
  DBRichViewEdit1.Change;
  DBRichViewEdit1.Format;
end;
CanChange calls table.Edit.
If you want to save changes in the table immediately, call table.Post instead of DBRichViewEdit1.Format.
The same sequence of actions is required if you modify DBRichViewEdit using "viewer-style" methods.

Posted: Thu Sep 28, 2006 7:34 am
by DevDude2006
Thank you, Sergey, for your super support.

Now it works perfect.

DevDude2006