Board index » delphi » TDBRichEdit -> TRichEdit -> TDBRichEdit

TDBRichEdit -> TRichEdit -> TDBRichEdit

Hi,
  in my code...
  S:= TMemoryStream.Create;
   TDBRichEdit1.SaveToStream(S);
   S.Posotion:;= 0;
   TRichEdit1.LoadFromStream(S);
... Do editing on TRichEdit1 (formating etc) then put back to DBRichEdit
as..
  S.Clear;
  TRichEdit1.SaveToStream(S);
  S.Position:= 0;
  TDBRichEdit1.LoadFromStream(S);
...
The TDBRichEdit1 content become the original
content + raw data (i believe is from TRichEdit1).
I have set the plaintext to false. :(
How can I get the TDBRichEdit content same as
the edited TRichEdit1?

TIA
Hott

 

Re:TDBRichEdit -> TRichEdit -> TDBRichEdit


On Wed, 8 Aug 2001 16:47:09 +0800, "Hott" <kkg...@nospam.mail.com>
wrote:

Quote
>The TDBRichEdit1 content become the original
>content + raw data

Mya be because the "rich text" format handled by a richedit is
different from the one handled by the database?

Manuel Algora
m...@encomix.es

Re:TDBRichEdit -> TRichEdit -> TDBRichEdit


Do you have any suggestion? What my intension is...
I set the TDBRichEdit to a single line height, (Conserve space)
and show another form(using TRichEdit) for editing only if the user choose
to edit.

Thanks
Hott

Quote
Manuel Algora <m...@encomix.es> wrote in message

news:n794nt824l09s0ngfe0gjv6nfv7htunhta@4ax.com...
Quote
> On Wed, 8 Aug 2001 16:47:09 +0800, "Hott" <kkg...@nospam.mail.com>
> wrote:

> >The TDBRichEdit1 content become the original
> >content + raw data

> Mya be because the "rich text" format handled by a richedit is
> different from the one handled by the database?

> Manuel Algora
> m...@encomix.es

Re:TDBRichEdit -> TRichEdit -> TDBRichEdit


Quote
"Hott" <kkg...@nospam.mail.com> wrote in message

Rather than:   TRichEdit -> TDBRichEdit
try                 TRichEdit -> to the TDBRichEdit's underlying data
field

hth
John

Re:TDBRichEdit -> TRichEdit -> TDBRichEdit


On Thu, 9 Aug 2001 15:40:13 +0800, "Hott" <kkg...@nospam.mail.com>
wrote:

Quote
>Do you have any suggestion? What my intension is...
>I set the TDBRichEdit to a single line height, (Conserve space)
>and show another form(using TRichEdit) for editing only if the user choose
>to edit.

What database and field type are you using? As far as I know, you
cannot use a TDBRichedit for a "formatted memo" Paradox field, because
this database uses its own RTF format, different from the one used by
TDBRichedit or TRichEdit. But a simple "memo" Paradox field is enough
to store/provide data from/to a TDBRichEdit or TRichEdit.

Why use a *TRichEdit* in the editing form? *If* the TDBRichEdit works
in your case, why not using a *TDBRichEdit* in the editing form?

The borland.public.delphi.database.desktop newsgroup would be the most
appropriate for any database related postings.

Manuel Algora
m...@encomix.es

Other Threads