Problem with Blob in the DBGrid

General TRichView support forum. Please post your questions here
Post Reply
J e f F
Posts: 4
Joined: Mon Jan 02, 2006 8:09 pm

Problem with Blob in the DBGrid

Post by J e f F »

Hi
I have a table with one BlobFied
I was using TDBRichEdit to this blob field.
In the new project is a Dbgrid (base in the example Delphi\DB Demo\3 DBGrid) to display this blobfield.
The old values are not shown, why ?

thanks Jeff.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You said that the new project does not show old values. Does it mean that it shows new values?

Did you connect RVReportHelper.RichView to some RVStyle?
Did you set RVReportHelper.RichView properties to load documents containg styles? (you can see values of these properties if you right-click any TRichView on form, choose "Settings" in the popup menu, set "Allow adding styles dynamically" mode)
J e f F
Posts: 4
Joined: Mon Jan 02, 2006 8:09 pm

Post by J e f F »

somebody can help me?

i need change the Dbgrid OndrawCell to work this ?

you can post the code?

thanks
J e f F
Posts: 4
Joined: Mon Jan 02, 2006 8:09 pm

Post by J e f F »

Hi Sergey,

The new records created in the TDBRichViewEdit are displayed in the DBgrid , the old records editing in the TDBRichEdit (default dellphi component) are not displayed.

I think the ondracell function (from the example 3 DBGrid) not works with old records. I need change this to work ?

thanks
Jeff
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

TDBRichEdit saves documents in RTF format.
TDBRichViewEdit saves documents in RVF format (by default).

That demo loads documents using LoadRVFFromStream method, so it cannot load RTF documents. Change it to LoadFromStream method, it autodetects data format.
J e f F
Posts: 4
Joined: Mon Jan 02, 2006 8:09 pm

Post by J e f F »

thanks

now works correct.

in the DrawRVFField procedure i have changed this line:

//rvh.RichView.LoadRVFFromStream(Stream)
rvh.RichView.LoadFromStream(Stream,rvynaAuto)
Post Reply