当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO SaveToFile 方法

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO SaveToFile 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 456 ::
收藏到网摘: n/a

The SaveToFile method is used to save the binary contents of an open Stream object to a local file.
SaveToFile的作用是:将已打开的记录流对象中的二进制内容保存到一个本地文件中。

Note: After a call to this method, the current position in the stream is set to the beginning of the stream (Position=0).
注意:请求该方法之后,记录流对象的当前位置已经被设置为记录流的起始位置了(Position[位置]=0)

Syntax
语法

objStream.SaveToFile filename,opt

Parameter参数 Description描述
filename Required. The name of the file to save the contents of the Stream object
必要参数。指定用于保存记录流对象内容的文件名
opt Optional. A SaveOptionsEnum value that specifies whether a file should be created if it does not exist or overwritten. Default is adSaveCreateNotExist. The values can be combined with the AND operator
可选参数。指定一个SaveOptionsEnum值,用于指名一个文件在不存在或已被覆盖掉的情况下时候应该被创建。默认值为adSaveCreateNotExist。该值可以与AND操作符一起使用


SaveOptionsEnum Values

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
如果文件已经存在,那么使用记录流对象(记录流对象已被打开)中的当前数据覆盖这个文件中的数据

评论 (0) All

登陆 | 还没注册?