Name

Stream.ReadText Method — (Versions 2.5, 2.6)

Synopsis

string = stream.ReadText (NumChars)

The ReadText method reads a number of characters from a binary stream.

Arguments

NumChars (Long or StreamReadEnum)

Optional. Specifies the number of characters to read from the text stream. The default value is adReadAll, which returns all the remaining characters in the stream. You can also specify to return the next line of data with the adReadLine enumeration value.

Returns

String

Description

The ReadText method reads textual streams (Stream.Type property is equal to adTypeText), while the Read method is used to read binary streams (Stream.Type property is equal to adTypeBinary).

The return value is a String of values, which equals the number of characters requested or the number of remaining characters in the stream if the number of remaining characters is less than the requested number of characters. If there is no data to return, a Null Variant value is returned.

See Also

Stream.Read Method, Stream.Type Property, StreamReadEnum Enumeration

Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.