編輯

共用方式為


WriteText method (ADO)

Applies to: Access 2013, Office 2013

Writes a specified text string to a Stream object.

Syntax

Stream.WriteTextData, Options

Parameters

Parameter Description
Data A String value that contains the text in characters to be written.
Options Optional. A StreamWriteEnum value that specifies whether a line separator character must be written at the end of the specified string.

Remarks

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.

Note

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