Главная страница | назад

Article #16162: Determining change of record in dataset

 Question and Answer Database

FAQ1162C.txt   Determining change of record in dataset
Category   :Data Components
Platform    :All
Product    :C++Builder  1.x


How can I determine when the current record in a dataset has 


Check the DataSource's State property in the OnDataChanged event.
The State property will be set to dsBrowse if the record 
position has changed. The following example will display a 
message box every time the record position has changed in 

void __fastcall TForm1::DataSource1DataChange(TSender* Sender, TField* Field)
   if (DataSet1->State == dsBrowse)
      MessageBox(0, "Record Changed", "Message", MB_OK);

7/2/98 10:32:32 AM

Last Modified: 01-SEP-99