[Overview][Types][Classes][Procedures and functions][Index] |
Saves the dataset to the specified stream using the given data format
Source position: bufdataset.pas line 648
public procedure TCustomBufDataset.SaveToStream( |
AStream: TStream; |
Format: TDataPacketFormat = dfBinary |
); |
AStream |
|
Stream used to save values |
Format |
|
Format used for values saved to the stream |
SaveToStream is a procedure used to store the content in the buffered dataset to a stream using the specified data format.
AStream is a TStream decendant where the field definitions and record data in the dataset will be stored.
Format is a TDataPacketFormat enumeration value that indicates the format used to stored dataset values into the stream. The default value is dfBinary, and causes the TFpcBinaryDatapacketReader to be used to write the content for the dataset. Use another value from the TDataPacketFormat enumeration to select a different registered data packet handler that handles the associated data format.
SaveToStream calls the CheckBiDirectional method to ensure that the dataset is opened for bi-directional record navigation. An Exception is raised if the UniDirectional property contains True. A temporary TDataPacketReader instance is created using the specified Format. SaveToStream calls the GetDatasetPacket method using the data packet handler to store the content in the buffered dataset to the stream.
SaveToStream is used in the implementation of the SaveToFile method.
TCustomBufDataset.UniDirectional |
|
Indicates if the dataset is for uni-directional navigation only |
|
Saves the dataset to the specified file using the given data format |
|
|
Indicates the format used for data packets in TBufDataset |
|
|
Registers a data packet reader using a specific format for TBufDataset |
|
|
Class type used to create data packet readers for TBufDataset |
|
|
Implements a data packet reader for TBufDataset |