Loads the content for the dataset from the specified stream.
Source position: memds.pp line 155
public procedure TMemDataset.LoadFromStream( |
F: TStream |
); |
F |
|
Stream used to load field definitions and record data. |
LoadFromStream is used to load the content for the dataset from the specified stream. F is a TStream descendent that is used to load the field definitions and record data for the in-memory dataset. LoadFromStream calls Close to ensure that the dataset saves its existing content (when FileName has been assigned) and clears any default Fields created when the dataset was opened.
LoadFromStream calls ReadFieldDefsFromStream to load field definitions from the stream in F. CreateTable is called to initialize storage for record data in the dataset. LoadDataFromStream is called to load any record data present in the stream. CheckMarker is called to ensure that the stream is positioned on the smEOF marker that signals the end of record data in the stream. An exception is raised if the stream was truncated or does not contain the value smEOF at the current position in the stream. LoadFromStream sets the value in the FileModified property to False.
Use SaveToStream to write the field definitions and record data in the dataset to a stream.
|
Saves field definitions and optional record data to the specified stream. |