WriteText Method

Writes a specified text string to a Stream object.


Stream.WriteText Data, Options  


A String value that contains the text in characters to be written.

Optional. A StreamWriteEnum value that specifies whether a line separator character must be written at the end of the specified string.


Specified strings are written to the Stream object without any intervening spaces or characters between each string.

The current Position is set to the character following the written data. The WriteText method does not truncate the rest of the data in a stream. If you want to truncate these characters, call SetEOS.

If you write past the current EOS position, the Size of the Stream will be increased to contain any new characters, and EOS will move to the new last byte in the Stream.


The WriteText method is used with text streams (Type is adTypeText). For binary streams (Type is adTypeBinary), use Write.

Applies To

Stream Object (ADO)

See Also

Write Method