ReadBinary Method
The stream from which to read the DataSet
Reads a DataSet from a binary stream
Syntax
'Declaration
Public Shared Function ReadBinary( _
ByVal _str_ As Stream _
) As DataSet
public static DataSet ReadBinary(
Stream _str_
)
Parameters
str
The stream from which to read the DataSet
Return Value
A populated DataSet, or null (Nothing in Visual Basic) if the stream was invalid or written using an older version of DataSetSurrogate
Remarks
The binary stream must have been written using the WriteBinary method as it uses a specific binary encoding scheme.
WriteBinary encodes the version of DataSetSurrogate that was used to produce the stream so as to avoid version and binary format conflicts with newer or older versions. If ReadBinary encounters a newer or older stream, it will return null (Nothing in Visual Basic) signifying that the cache data is no longer valid and needs to be refreshed.
IMPORTANT: The ReadBinary and WriteBinary methods only support simple DataSets with tables, columns, rows (with data) and relationships. All other information will be lost. This includes keys, constraints, extended properties, etc
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server family