TMemDataset.CreateBlobStream function
Creates a stream used to read or write Blob field data in the in-memory dataset.
Declaration
function CreateBlobStream(Field: TField; Mode: TBlobStreamMode)
: TStream; overrideArguments
Field | Field for the Blob stream. |
Mode | Permissions for the Blob stream. |
Function result
Stream created for the Blob field.
Description
CreateBlobStream is an overridden TStream function which creates a TMDSBlobStream for the specified field with the read/write permissions in Mode. CreateBlobStream is called when the specified Field needs to read or write its value (for TBlobField or descendent field types).
Mode indicates the permissions need for the blob stream. When Mode contains bmWrite, the value in the State property must indicate that the editing operation is enabled. An exception is raised using DatabaseErrorFmt if State contains a value other than: dsEdit, dsInsert, dsFilter, or dsCalcFields.
Similarly, the Field must allow editing when not in dsSetKey or dsFilter state. An exception is raised using DatabaseErrorFmt if Field has its ReadOnly property set.
The return value contains the TMDSBlobStream instance created using Field and Mode as arguments. Please note that the Blob stream is not saved as part of the data in the in-memory dataset; in its dynamically created and freed as needed.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
