FireDAC.Comp.Client.TFDCustomManager.GetTableNames

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure GetTableNames(const AConnectionName, ACatalogName, ASchemaName,
APattern: string; AList: TStrings; AScopes: TFDPhysObjectScopes = [osMy];
AFullName: Boolean = True);

C++

void __fastcall GetTableNames(const System::UnicodeString AConnectionName, const System::UnicodeString ACatalogName, const System::UnicodeString ASchemaName, const System::UnicodeString APattern, System::Classes::TStrings* AList, Firedac::Phys::Intf::TFDPhysObjectScopes AScopes = (Firedac::Phys::Intf::TFDPhysObjectScopes() << Firedac::Phys::Intf::TFDPhysObjectScope::osMy ), bool AFullName = true);

Properties

Type Visibility Source Unit Parent
procedure
function
public
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDCustomManager

Description

Populates a string list with the names of tables in a DB.

Call GetTableNames to retrieve a list of tables from a DB. 

AConnectionName is the connection name to use. 

ACatalogName, ASchemaName restrict table names to the catalog and schema. 

APattern is the LIKE-pattern for filtering table names. 

AList is a TStrings descendant that receives the table names. Any existing strings are deleted from the list before GetTableNames adds the names of all the tables in a DB. 

AScopes restricts table names to the specified scopes. 

AKinds restricts tables to the specified object kinds. 

The table names are normalized (enclosed in quotes), if required; otherwise, they are converted to default database dictionary case sensitive/insensitive. Specify the MetaDefSchema and/or MetaDefCatalog parameters in the connection definition to avoid having these schema and/or catalog names in table names.

Example

FDManager.GetTableNames('myconn', 'NORTHWIND', 'DBO', 'ADQA%', '', ListBox1.Items,
  [osMy, osSystem, osOther], [tkTable, tkView]);

See Also