[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'DBCtrls' (#lcl)

# TDBMemo.LoadMemo

Loads the lines of text for the memo from the field in the linked data set.

## Declaration

Source position: dbctrls.pp line 1026

`public procedure TDBMemo.LoadMemo; virtual;`

## Description

LoadMemo is a method used to load the text for the control from the field in the linked data set. No actions are performed in the method if the value for the memo has already been loaded, the field in the data link has not been assigned, or the field does not use the TBlobField field type.

LoadMemo signals the OnGetText event handler (when assigned in the field data link) to get the Text value for the blob field. If OnGetText has not been assigned, the AsString value for the blob field is retrieved. The retrieved value is stored to the Lines property when it differs from the existing value in Lines.

If an EInvalidOperation exception occurs while getting the value for the control, the exception is caught and the message is stored in the Lines property.

LoadMemo is called when the value in AutoDisplay is changed to True, when the DataChange method is called, and when the Enter key is handled in the KeyPress method.

## Version info

Modified in LCL version 3.6 to update Lines when the field value differs from the existing value in Lines.

## See also

TDBMemo.AutoDisplay |  | AutoDisplay - if True, automatically displays the data when loaded from the linked dataset.
TDBMemo.DataChange |  | DataChange - if Data changed, loads the new data into the appropriate part of the Field.
TDBMemo.KeyPress |  | Signals the OnKeyPress event handler (when assigned).
TFieldDataLink |  | Maintains an association between a control, an action, and a field in a linked dataset.
#lcl.stdctrls.TCustomMemo.Lines |  | Contains the individual lines of text in the multi-line edit control.
TBlobField.IsBlob
TField.OnGetText
TField.Text
TField.AsString