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.