|
|
Top Previous Next |
|
Use TDBRichView to display hypertext documents stored in database field. Unit DBRV; Syntax TDBRichView = class(TCustomRichView) DBRichView does not display its content if it is not linked to RVStyle component via Style property. The most important property settings can be done in the component editor for TRichView. In Delphi (C++Builder) IDE, right click the DBRichView object on the form, choose "Settings" in the context menu. If the application doesn't require the data-aware capabilities of TDBRichView, use TRichView instead, to conserve system resources. For editing documents in database fields, use TDBRichViewEdit. Hierarchy TObject TPersistent TComponent TControl TWinControl TCustomControl Field Type This component must be linked to BLOB field. If you use RVF (RichView Format), the database field must have binary BLOB type (i.e. must have ability to store arbitrary binary data, without conversion and filtering of characters). For example, in Paradox Tables it is "Binary", in Microsoft Access tables it is "OLE Object". You can also use text BLOB field type (memo). Memo fields cannot store binary data, so it is impossible to store documents in RVF format in them (unless you exclude rvfoSaveBinary from RVFOptions). However, you can use memo fields:
Starting from Delphi 2006, Unicode memo fields (Field.DataType=ftWideMemo) are supported specially. TDBRichView does not attempt loading RVF from these fields. It tries to load Unicode RTF (RTF code converted from String to WideString) or Unicode text from them. Supported Data Formats The supported field formats are:
For all field types except for Unicode memos:
For Unicode memos:
Events OnNewDocument event occurs when creating a new document or before loading an existing one from the field. When the document is loaded from the field, OnLoadDocument occurs. OnLoadCustomFormat allows loading documents in custom formats.
|