TMemDataset.LoadDataFromStream procedure
Loads record data from the specified stream.
Declaration
procedure LoadDataFromStream(F: TStream); virtualArguments
F | Stream used to load record data into the dataset. |
Description
LoadDataFromStream is used to load record data for the in-memory dataset from the specified stream. F is the TStream descendent used to load the record data for the in-memory dataset.
LoadDataFromStream calls CheckMarker to ensure that the smData marker value is present at the current position in the stream. An exception is raised if the stream is truncated, or a value other than smData is read from the stream in F. An Integer value is read from the stream that indicates the size required for record storage in the dataset. The value may be 0 (zero) if the record data has been omitted from the stream.
LoadDataFromStream clears any memory allocated in internal storage for record data or blob fields. LoadDataFromStream copies the required number of bytes from F into the internal record storage for the dataset. The value in RecCount is updated to reflect the number of records read from the stream using the RecSize for the dataset. The value in CurrRecNo is set to -1 to indicate that no record is current active in the dataset.
Use SaveDataToStream to write record data to a stream.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
