Open Method
Close Method
EOS Propery
METHOD: Stream::SaveToFile
Implemented in version 2.5
streamobject.
SaveToFile
FileName,
SaveOptions
The
SaveToFile
method can be called when you want to save the binary contents of a
Stream
object to a local file. This can be an already existing file or a newly created file. After the save is accomplished, the position will be set to zero. If you save to an existing file, all existing bytes contained in the file will be completely overwritten.
This method does not change or affect the
Stream
object in any way.
There is one mandatory and one optional parameter.
The
FileName
parameter is a string that is the name of the file (including the path, if needed) into which the data will be saved. This can be the name of an existing file or a new file you wish to create.
The optional
SaveOptions
parameter is one of the
SaveOptionsEnum
constants that allow you to either overwrite an existing file or create a new file. If left blank, the default is to create a new file.
SaveOptionsEnum Constants
Constant
Value
Description
adSaveCreateNotExist
1
Default, creates a new file
adXactCommitRetaining
4
Completely overwrite data in an existing file
Code (VBScript):
objStream.
SaveToFile
Chant43.txt, adXactCommitRetaining
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information