ADO data state (Views: 27)
Problem/Question/Abstract: ADO data state Answer: This little code snip is how to get the database's state as it changes. procedure TForm1.DataSource1StateChange(Sender: TObject); var ds: string; begin case ADOTable1.State of dsInactive: ds := 'Closed'; dsBrowse: ds := 'Browsing'; dsEdit: ds := 'Editing'; dsInsert: ds := 'New record inserting'; else ds := 'Other states' end; Caption := 'ADOTable1 state: ' + ds; end; |