Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

ADO 模式 属性


❮ 连接对象完整参考

Mode 属性设置或返回一个 ConnectModeEnum 值,该值指示修改 Connection、Record 或 Stream 对象中数据的权限。当对象关闭时,此属性为读/写属性;当对象打开时,此属性为只读属性。

  • Connection 对象 - 默认值为 adModeUnknown
  • Record 对象 - 默认值为 adModeRead
  • Stream 对象 - 默认值为 adModeRead 或 adModeUnknown

注意: 只能在 Connection 对象关闭时设置此属性。


语法

object.Mode

示例

<%
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

常量 描述
adModeUnknown 0 权限未设置或无法确定。
adModeRead 1 只读。
adModeWrite 2 只写。
adModeReadWrite 3 读/写。
adModeShareDenyRead 4 阻止其他人以读取权限打开连接。
adModeShareDenyWrite 8 阻止其他人以写入权限打开连接。
adModeShareExclusive 12 阻止其他人打开连接。
adModeShareDenyNone 16 允许其他人以任何权限打开连接。
adModeRecursive 0x400000 与 adModeShareDenyNone、adModeShareDenyWrite 或 adModeShareDenyRead 一起使用,以设置当前记录的所有子记录的权限。
 
❮ 连接对象完整参考
×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.