HTML Importer and DBRichViewEdit

General TRichView support forum. Please post your questions here
Post Reply
DevDude2006
Posts: 2
Joined: Wed Sep 27, 2006 2:18 pm

HTML Importer and DBRichViewEdit

Post 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
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
DevDude2006
Posts: 2
Joined: Wed Sep 27, 2006 2:18 pm

Post by DevDude2006 »

Thank you, Sergey, for your super support.

Now it works perfect.

DevDude2006
Post Reply