TMemDataset.SaveFieldDefsToStream procedure
Saves field definitions to the specified stream.
Declaration
procedure SaveFieldDefsToStream(F: TStream)Arguments
F | Stream where field definitions are written. |
Description
SaveFieldDefsToStream is used to save field definitions for the in-memory dataset to the specified stream. SaveFieldDefsToStream is used in the SaveToStream method.
SaveFieldDefsToStream writes a marker value that indicates the beginning of field definitions, the number of field definitions, and data for each of the TFieldDef items in FieldDefs. SaveFieldDefsToStream calls WriteMarker to write the smFieldDefs marker value to the stream in F. The number of items in FieldDefs is also written to the steam. Values for each of the TFieldDef items in FieldDefs are written to the stream in the following format:
| Field Def Item | Data Type | Origin of Value |
|---|---|---|
| Field Def Name Len | Integer | Length(TFieldDef.Name) |
| Field Def Name | String | TFieldDef.Name |
| Field Def Size | Integer | TFieldDef.Size |
| Field Def Data Type | Integer | Ord(TFieldDef.DataType) |
| Field Def Required | Integer | Ord(TFieldDef.Required) |
Values written in the method can be loaded using ReadFieldDefsFromStream.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
