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

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO Open 方法


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

The Open method is used to open a Stream object.
Open的作用是:打开一个Strean[记录流]对象。

Syntax
语法

objStream.Open source,mode,opt,username,psword

Parameter参数 Description描述
source Optional. The data source for the Stream object (a URL that points to an existing node in a tree structure, like an e-mail or file system or a reference to an already opened Record object). If source is not specified, a new Stream object, with a size of zero, will be created and opened
可选参数。指定Stream[记录流]对象的数据源(一个指向树型结构的现存节点,如一个e-mail,或是一个文件系统,或是一个记录对象(该记录对象已打开)的参数)。如果未指定数据源,那么将创建并打开一个全新的0长度的Stream[记录流]对象
mode Optional. A ConnectModeEnum value that specifies the access mode for a Stream object. Default is adModeUnknown
可选参数。指定一个用来指示Stream[记录流]对象访问模式的ConnectModeEnum值。默认值为adModeUnknown
opt Optional. A StreamOpenOptionsEnum value that specifies options for opening a Stream object. Default is adOpenStreamUnspecified
可选参数。指定一个用于指明Stream[记录流]对象开启选项的一个或多个RecordOpenOptionsEnum值。默认值为adOpenRecordUnspecified
username Optional. A name of a user who can access the Stream object. If Source is an already opened Record, this parameter is not specified
可选参数。指定允许访问数据源的授权用户ID。如果数据源是一个已经打开的记录,那么不需要指定该参数
psword Optional. A password that validates the username. If Source is an already opened Record, this parameter is not specified
可选参数。指定授权用户的用户名相对应的密码。如果数据源是一个已经打开的记录,那么不需要指定该参数


ConnectModeEnum Values

Constant常量 Value值 Description描述
adModeUnknown 0 Default. Permissions have not been set or cannot be determined
默认值。表明权限尚未设置或无法确定
adModeRead 1 Read-only
只读
adModeWrite 2 Write-only
只写
adModeReadWrite 3 Read/write
可读/可写
adModeShareDenyRead 4 Prevents others from opening a connection with read permissions
防止其他用户使用读权限打开连接
adModeShareDenyWrite 8 Prevents others from opening a connection with write permissions
防止其他用户使用写权限打开连接
adModeShareExclusive 12 Prevents others from opening a connection
防止其他用户打开连接
adModeShareDenyNone 16 Allows others to open a connection with any permissions
防止其他用户使用任何权限打开连接
adModeRecursive 0x400000 Used with adModeShareDenyNone, adModeShareDenyWrite, or adModeShareDenyRead to set permissions on all sub-records of the current Record
组合使用adModeShareDenyNone、adModeShareDenyWrite或adModeShareDenyRead对当前记录的所有子记录设置权限


StreamOpenOptionsEnum Values

Constant常量 Value值 Description描述
adOpenStreamUnspecified -1 Default. Opens the Stream object with default options
默认值。使用默认选项打开Stream[记录流]对象
adOpenStreamAsync 1 Opens the Stream object in asynchronous mode
以异步方式打开Stream[记录流]对象
adOpenStreamFromRecord 4 Identifies the contents of the Source parameter to be an already open Record object. The default behavior is to treat Source as a URL that points directly to a node in a tree structure. The default stream associated with that node is opened.
将Source参数的内容视为一个已经打开的Record对象。默认的特性是将数据源视为直接指向一个树形结构的节点的URL。该节点默认的记录流是打开的

评论 (0) All

登陆 | 还没注册?