The easiest way to access data is with an AdsTable component. At a minimum, you must set the AdsTable's AdsConnection property to an AdsConnection (this is often done at design time), its TableName property to the name of a table or view you want to access, and the Active property to True. Calling the AdsTable's Open method sets the AdsTable's Active property to True.
This is demonstrated in the following event handler, which is associated with the Show Invoice Table button (shown in Figure 15-2):
procedure TForm1.ShowInvoiceBtnClick(Sender: TObject);
if AdsTable1.Active then AdsTable1.Close;
AdsTable1.TableName := 'INVOICE';
DataSource1.DataSet := AdsTable1;