FireDAC.Comp.Client.TFDCustomConnection.GetTableNames
Delphi
procedure GetTableNames(const ACatalogName, ASchemaName, APattern: string; AList: TStrings; AScopes: TFDPhysObjectScopes = [osMy]; AKinds: TFDPhysTableKinds = [tkSynonym, tkTable, tkView]; AFullName: Boolean = True);
C++
void __fastcall GetTableNames(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 ), Firedac::Phys::Intf::TFDPhysTableKinds AKinds = (Firedac::Phys::Intf::TFDPhysTableKinds() << Firedac::Phys::Intf::TFDPhysTableKind::tkSynonym << Firedac::Phys::Intf::TFDPhysTableKind::tkTable << Firedac::Phys::Intf::TFDPhysTableKind::tkView ), bool AFullName = true);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp |
FireDAC.Comp.Client | TFDCustomConnection |
Description
Populates a string list with the names of tables in a DB.
Call GetTableNames to retrieve a list of tables in a DB.
ACatalogName, ASchemaName
restrict table names to the catalog and schema.
APattern
is the LIKE-pattern 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 quotation marks, if that is required – otherwise are converted to default dictionary case. Specify, MetaDefSchema
, MetaDefCatalog
, or both parameters in connection definition, to avoid these schema and/or catalog names in table names.
Example
FDConnection1.GetTableNames('NORTHWIND', 'DBO', 'ADQA%', '', ListBox1.Items,
[osMy, osSystem, osOther], [tkTable, tkView]);
See Also
Samples
- FireDAC Get Field Names sample