[Overview][Constants][Classes][Index] | Reference for unit 'memds' (#fcl)

# TMemDataset.SaveToStream

Saves field definitions and optional record data to the specified stream

## Declaration

Source position: memds.pp line 146

`public procedure TMemDataset.SaveToStream(`
`F: TStream`
`); procedure TMemDataset.SaveToStream(`
`F: TStream;`
`SaveData: Boolean`
`);`

## Arguments

`F` |  | Stream used to save field definitions and optional data

## Arguments

`F` |  | Stream used to save field definitions and optional data
`SaveData` |  | Indicates if record data is saved to the stream

## Description

SaveToStream is used to save field definitions and optional record data for the in-memory dataset to the specified stream. SaveToStream calls SaveFieldDefsToStream to save the field definitions in FieldDefs to the stream specified in F.

SaveData indicates if record data is included in the values written to the stream. When SaveData contains True, the SaveDataToStream method is called to save record data to the stream. No record data is written when SaveData is False. SaveToStream calls WriteMarker to write the smEOF marker value that signifies the end of record data in the stream.

Use LoadFromStream to load field definitions and record data for the in-memory dataset.

## See also

TMemDataset.LoadFromStream |  | Loads the content for the dataset from the specified stream

Documentation generated on: May 14 2021