Data.Win.ADODB.TCustomADODataSet.OnMoveComplete

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnMoveComplete: TRecordsetErrorEvent read FOnMoveComplete write FOnMoveComplete;

C++

__property TRecordsetErrorEvent OnMoveComplete = {read=FOnMoveComplete, write=FOnMoveComplete};

Properties

Type Visibility Source Unit Parent
event published
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TCustomADODataSet

Description

Occurs after the row pointer in a recordset has moved.

Write an OnMoveComplete event handler to take specific action after the row pointer has moved in the dataset component's Recordset object. Calls to the First, Last, Next, Prior, MoveBy, Insert, Delete, Post, Requery, and Resynch methods can lead to the firing of this event. Setting or getting a bookmark can also trigger the event.

DataSet is the ADO dataset component that triggered the OnMoveComplete event. This dataset component also contains the recordset in question.

Reason indicates the type of move that triggered the event. While the TEventReason type contains more constants, the value of Reason for an OnMoveComplete event is limited to: erRequery, erMove, erMoveFirst, erMoveNext, erMovePrevious, and erMoveLast.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Note:  : A Recordset object's row pointer is distinct from the record pointer of its ADO dataset component. It is possible that the ADO Recordset object will generate row movement events without the ADO dataset component generating a BeforeScroll or AfterScroll event. The reasons for this are background updating and resynchronizing of the records as data is changed. The OnMoveComplete event is purely a Recordset object event and independent of any dataset component record navigation events.

See Also