Page 1 of 1

List of tables in a DB

Posted: Fri 28 Feb 2014 15:40
by piopio1
Hello,

How can I get the list of tables in a PostgreSQL DB with PgDAC ?

Many thanks
Pio Pio

Re: List of tables in a DB

Posted: Mon 03 Mar 2014 11:06
by AlexP
Hello,

There is a demo sample of retrieving the table list.

Code: Select all

var
  TableList: TStringList;
  i: integer;
begin
  TableList := TStringList.Create;
  try
    PgConnection1.GetTableNames(TableList);
    for i := 0 to TableList.Count - 1 do
      ShowMessage(TableList[i]);
  finally
    TableList.Free;
  end;
end;