RAD Studio |  |

Inspecting the Update Status of Individual Rows
See Also
Collapse All

Determine the update status of a given row by making it current and then inspecting the RecordStatus property of the ADO data component. RecordStatus reflects the update status of the current row and only that row.

Copy Code

    if (rsNew in ADOQuery1.RecordStatus) then
    begin
    ...
    end;
    else
    if (rsDeleted in ADOQuery1.RecordStatus) then
    begin
    ...
    else

Copy Code

    switch (ADOQuery->RecordStatus)
    {
      case rsUnmodified:
        StatusBar1->Panels->Items[0]->Text = "Unchanged record";
        break;
      case rsModified:
        StatusBar1->Panels->Items[0]->Text = "Changed record";
        break;
      case rsDeleted:
        StatusBar1->Panels->Items[0]->Text = "Deleted record";
        break;
      case rsNew:
        StatusBar1->Panels->Items[0]->Text = "New record";
        break;
    }

See Also

Opening the Dataset in Batch Update Mode

Filtering Multiple Rows Based On Update Status

Applying the Batch Updates to Base Tables

Canceling Batch Updates

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!