ADO SaveToFile 메서드


❮ 전체 스트림 개체 참조

SaveToFile 메서드는 열려 있는 Stream 개체의 이진 콘텐츠를 로컬 파일에 저장하는 데 사용됩니다.

참고: 이 메서드를 호출하면 스트림의 현재 위치가 스트림의 시작 부분으로 설정됩니다(Position=0).

통사론

objStream.SaveToFile filename,option

Parameter Description
filename Required. The name of the file to save the contents of the Stream object
option Optional. A SaveOptionsEnum value that specifies whether a file should be created if it does not exist or overwritten. Default is adSaveCreateNotExist.

SaveOptionsEnum 값

Constant Value Description
adSaveCreateNotExist 1 Default. Creates a new file if the file does not already exist
adSaveCreateOverWrite 2 Overwrites the file with the data from the currently open Stream object, if the file already exists

❮ 전체 스트림 개체 참조