当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO Mode 属性

ADO
ADO介绍
ADO数据库连接
ADO记录集
ADO显示记录
ADO查询语句
ADO记录排序
ADO添加记录
ADO更新记录
ADO删除记录
ADO演示
ADO提升执行速度
ADO Command对象
ADO Connection对象
ADO Error
ADO Field
ADO Parameter
ADO 属性
ADO Record
ADO Recordset
ADO Stream

ADO Mode 属性


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

The Mode property sets or returns a ConnectModeEnum value that indicates the permission for modifying data in a Connection, Record, or Stream object. This property is read/write when an object is closed, and read-only when an object is open.
Mode属性的作用是:设置或返回一个ConnectModeEnum值,它的作用是指示是否允许在一个连接、记录或记录流对象中修改数据信息。当对象被关闭时,该属性对其有可读/可写权限;如果对象被打开后,该书行进对其有只读功能。

  • Connection object - Default is adModeUnknown
    Connection 对象 – 默认值为adModeUnknown
  • Record object - Default is adModeRead
    Record 对象 – 默认值为adModeRead
  • Stream object - Default is adModeRead or adModeUnknown
    Stream 对象 – 默认值为adModeRead 或 adModeUnknown

Note: This property can be set only when the Connection object is closed.
注意:该属性仅允许在连接关闭时设置。

Syntax
语法

object.Mode

Example
案例

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Mode=adModeReadWrite
conn.Open(Server.Mappath("northwind.mdb"))
response.write(conn.Mode)
conn.Close
%> 


ConnectModeEnum

Constant常量 Value值 Description描述
adModeUnknown 0 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设置当前记录中所有子记录的权限
 

评论 (0) All

登陆 | 还没注册?