trichview.com

trichview.support




Re: DBRVE


Return to index


Author

Message

Sergey Tkachenko

Posted: 11/07/2003 21:28:40


This example shows how to use viewer-style methods in DBRichViewEdit (i.e.

methods, introduced in TCustomRichView).

The example uses a sequence Clear; LoadRTF. But it also applies to just

Clear.


DBRichViewEdit1 edits a field of table Table1.We want to load RTF file.


procedure TForm1.Button1Click(Sender: TObject);

begin

  if OpenDialog1.Execute then begin

    Table1.Edit;

    DBRichViewEdit1.Clear;

    DBRichViewEdit1.LoadRTF(OpenDialog1.FileName);

    DBRichViewEdit1.Change;

    DBRichViewEdit1.Format;

  end;

end;


If you want to save changed in the database immediately, call Table1.Post

instead of DBRichViewEdit1.Format.


This sequence of actions (Edit - modifications - Change - Format) is

required only for viewer-style methods.

Methods introduced in TCustomRichViewEdit do this work automatically:



procedure TForm1.Button2Click(Sender: TObject);

begin

  if OpenDialog1.Execute then

    DBRichViewEdit1.InsertRTFFromFileEd(OpenDialog1.FileName);

end;


> After calling dbrve.clear the database is not updated.

> How to force the update?





Powered by ABC Amber Outlook Express Converter