MDAC 2.5 SDK - ADO


 

ReadText Method

See Also    Example    Applies To

Reads specified number of characters from a text Stream object.

Syntax

String = Stream.ReadText ( NumChars )

Parameters

NumChars   Optional. A Long value that specifies the number of characters to read from the file, or a StreamReadEnum value. The default value is adReadAll.

Return Value

The ReadText method reads a specified number of characters, an entire line, or the entire stream from a Stream object and returns the resulting string.

Remarks

If NumChar is more than the number of characters left in the stream, only the characters remaining are returned. The string read is not padded to match the length specified by NumChar. If there are no characters left to read, a variant whose value is null is returned. ReadText cannot be used to read backwards.

The ReadText method is used with text streams (Type is adTypeText). For binary streams, use Read.