Mega Code Archive

 
Categories / Delphi / ADO Database
 

How to get all tables in a paradox database

Title: How to get all tables in a paradox database Question: Answer: The method GetTableNames from the Session object returns all tables that are 'behind' an alias. All what you need is a TDatabase object: Database1.Session.GetTableNames('DBDEMOS','', True, False, Listbox1.Items); To get the fields from a certain table, just use GetFieldNames: procedure TForm2.ListBox1Click(Sender: TObject); begin Listbox2.Clear; Table1.TableName := Listbox1.Items[Listbox1.ItemIndex]; Table1.GetFieldNames(Listbox2.Items); end;