{ The table should be closed when changing the database }
Table1.Active := False;
try
{ First try to use an alias }
  Table1.DatabaseName := 'Delphi_Demos';
  Table1.Active := True;
except
  on EDatabaseError do
    { If that fails, try to use the drive and directory }
    Table1.DatabaseName := 'c:\delphi\demos\database';
    Table1.Active := True;
end; 

