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

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO CursorLocation 属性


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

The CursorLocation property sets or returns a long value that indicates the location of the cursor service. It can be set to one of the CursorLocationEnum values. Default value is AdUseServer.
CursorLocation属性的作用是:设置或返回指针的位置。可以是CursorLocationEnum之中的其中一个值。默认值为AdUseServer。

A cursor is used to:
指针的作用如下:

  • control record navigation
    控制记录导航
  • control the visibility of changes in the database
    控制变更数据库的可见性
  • control the updatability of data
    控制数据的更新性能

Note: A Recordset object inherits this setting from the associated Connection object.
注意:一个Recordset对象继承了与Connection对象相关的属性设置。

Note: This property is read-only on an open Recordset object, and read/write on a Connection object or on a closed Recordset object.
注意:这个属性对于一个打开的Recordset对象只具有只读权限;如果是对于一个Connection对象或是一个关闭的Recordset对象而言,它则对其具有可读/可写权限。

Syntax
语法

objConnection.CursorLocation
objRecordset.CursorLocation

Example
案例

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("northwind.mdb"))
set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM Customers"
rs.CursorLocation=adUseClient
rs.CursorType=adOpenStatic
rs.LockType=adLockBatchOptimistic
rs.Open sql,conn
rs.Close
conn.Close
%>


CursorLocationEnum Values

Constant常量 Value值 Description描述
adUseNone 1 OBSOLETE (appears only for backward compatibility). Does not use cursor services
OBSOLETE[作废的](仅向后兼容)没有使用游标服务
adUseServer 2 Default. Uses a server-side cursor
默认值。使用服务器端指针
adUseClient 3 Uses a client-side cursor supplied by a local cursor library. For backward compatibility, the synonym adUseClientBatch is also supported
只用由本地指针库提供的客户端指针。与adUseClient具有类似功能的adUseClientBatch也支持向后兼容

评论 (0) All

登陆 | 还没注册?