Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











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
adSaveCreateOverwrite 2 Completely overwrite data in an existing file

 
Code (VBScript):
objStream.SaveToFile Chant43.txt, adSaveCreateOverwrite

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information