MoveFirst、MoveLast、MoveNext 和 MovePrevious 方法 (RDS)MoveFirst, MoveLast, MoveNext, and MovePrevious Methods (RDS)

移动到指定 记录集 对象中的第一条、最后一条、下一条记录或上一条记录。Moves to the first, last, next, or previous record in a specified Recordset object.

重要

从 Windows 8 和 Windows Server 2012 开始,Windows 操作系统中不再包含 RDS 服务器组件 (参阅 Windows 8 和 Windows Server 2012 兼容性指南 ,以了解更多详细信息) 。Beginning with Windows 8 and Windows Server 2012, RDS server components are no longer included in the Windows operating system (see Windows 8 and Windows Server 2012 Compatibility Cookbook for more detail). 在 Windows 的未来版本中将删除 RDS 客户端组件。RDS client components will be removed in a future version of Windows. 请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。Avoid using this feature in new development work, and plan to modify applications that currently use this feature. 使用 RDS 的应用程序应迁移到 WCF 数据服务Applications that use RDS should migrate to WCF Data Service.

语法Syntax

  
DataControl.Recordset.{MoveFirst | MoveLast | MoveNext | MovePrevious}  

参数Parameters

DataControlDataControl
表示 RDS 的对象变量 。DataControl 对象。An object variable that represents an RDS.DataControl object.

备注Remarks

可以将 Move 方法用于 RDS。DataControl 对象,用于在网页上浏览数据绑定控件中的数据记录。You can use the Move methods with the RDS.DataControl object to navigate through the data records in the data-bound controls on a Web page. 例如,假设您通过绑定到 RDS 在网格中显示一个 记录集 。DataControl 对象。For example, suppose you display a Recordset in a grid by binding to an RDS.DataControl object. 然后,你可以包括 "第一个"、"最后一个"、"下一个" 和 "上一个" 按钮,用户可以单击这些按钮移动到所显示的 记录集中 的第一个、最后一个、下一个或You can then include First, Last, Next, and Previous buttons that users can click to move to the first, last, next, or previous record in the displayed Recordset. 为此,可调用 MoveFirstMoveLastMoveNextMovePrevious 方法 第一个、最后一个、下一个和上一个按钮的 onClick 过程中的 DataControl 对象。You do this by calling the MoveFirst, MoveLast, MoveNext, and MovePrevious methods of the RDS.DataControl object in the onClick procedures for the First, Last, Next, and Previous buttons, respectively. 通讯簿示例显示了如何执行此操作。The Address Book example shows how to do this.

应用于Applies To

DataControl 对象 (RDS)DataControl Object (RDS)

另请参阅See Also

ADO (移动方法) Move Method (ADO)
MoveFirst、MoveLast、MoveNext 和 MovePrevious 方法 (ADO) MoveFirst, MoveLast, MoveNext, and MovePrevious Methods (ADO)
MoveRecord 方法 (ADO)MoveRecord Method (ADO)