Page 1 of 1
Problem with Blob in the DBGrid
Posted: Mon Jan 02, 2006 8:15 pm
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.
Posted: Tue Jan 03, 2006 10:50 am
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)
Posted: Tue Jan 03, 2006 10:51 am
by J e f F
somebody can help me?
i need change the Dbgrid OndrawCell to work this ?
you can post the code?
thanks
Posted: Tue Jan 03, 2006 11:05 am
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
Posted: Tue Jan 03, 2006 11:15 am
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.
Posted: Tue Jan 03, 2006 1:13 pm
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)