当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO CursorLocation 属性
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:
指针的作用如下:
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对象而言,它则对其具有可读/可写权限。
objConnection.CursorLocation objRecordset.CursorLocation |
<% 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 %> |
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也支持向后兼容 |