Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Read Method

Read Method

 

Reads a specified number of bytes from a binary Stream object.

Variant = Stream.Read ( NumBytes)

 NumBytes 

Optional. A Long value that specifies the number of bytes to read from the file or the StreamReadEnum value adReadAll, which is the default.

The Read method reads a specified number of bytes or the entire stream from a Stream object and returns the resulting data as a Variant.

If NumBytes is more than the number of bytes left in the Stream, only the bytes remaining are returned. The data read is not padded to match the length specified by NumBytes. If there are no bytes left to read, a variant with a null value is returned. Read cannot be used to read backwards.

System_CAPS_noteNote

 NumBytes always measures bytes. For text Stream objects (Type is adTypeText), use ReadText.

Show:
© 2015 Microsoft