ADOWriteTextメソッド_
❮完全なストリームオブジェクトリファレンス
WriteTextメソッドは、テキストをテキストStreamオブジェクトに書き込むために使用されます。
Streamオブジェクトにデータがあり、現在の位置がEOSの場合、既存のデータに加えて新しいデータが追加されます。現在位置がEOSでない場合、既存のデータは上書きされます。
過去のEOSを書き込むと、ストリームのサイズが大きくなります。EOSはストリームの最後の文字に設定されます。過去のEOSを書き込まない場合、現在の位置は新しく追加されたデータの次の文字に設定されます。以前の既存のデータは切り捨てられません。SetEOSメソッドを呼び出して切り捨てます。
注:このメソッドは、テキストStreamオブジェクトでのみ使用されます。バイナリStreamオブジェクトの場合は、Writeメソッドを使用します。
構文
objStream.WriteText data,opt
Parameter | Description |
---|---|
data | Required. The text to be written to a text Stream object |
opt | Optional. A StreamWriteEnum value that specifies whether a line separator must be added to the text |
StreamWriteEnum値
Constant | Value | Description |
---|---|---|
adWriteChar | 0 | Default. Writes the specified text to a Stream object |
adWriteLine | 1 | Writes the specified text and a line separator to a Stream object. If the LineSeparator property is not defined, a run-time error will occur |
❮完全なストリームオブジェクトリファレンス