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.
if (rsNew in ADOQuery1.RecordStatus) then begin ... end; else if (rsDeleted in ADOQuery1.RecordStatus) then begin ... else
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; }
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|