ADO 쓰기 텍스트 메서드


❮ 전체 스트림 개체 참조

WriteText 메서드는 텍스트 Stream 개체에 텍스트를 쓰는 데 사용됩니다.

Stream 객체에 데이터가 있고 현재 위치가 EOS인 경우 기존 데이터에 새로운 데이터가 추가됩니다. 현재 위치가 EOS가 아닌 경우 기존 데이터를 덮어씁니다.

EOS를 지나치면 Stream의 크기가 증가합니다. 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

❮ 전체 스트림 개체 참조