Author: Tomas Rutkauskas
ADO data state
Answer:
This little code snip is how to get the database's state as it changes.
1 2 procedure TForm1.DataSource1StateChange(Sender: TObject);
3 var4 ds: string;
5 begin6 case ADOTable1.State of7 dsInactive: ds := 'Closed';
8 dsBrowse: ds := 'Browsing';
9 dsEdit: ds := 'Editing';
10 dsInsert: ds := 'New record inserting';
11 else12 ds := 'Other states'
13 end;
14 Caption := 'ADOTable1 state: ' + ds;
15 end;