Data.SqlExpr.TSQLConnection.GetTableNames

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure GetTableNames(List: TStrings; SystemTables: Boolean = False); overload;
procedure GetTableNames(List: TStrings; SchemaName: string; SystemTables: Boolean = False); overload;

C++

void __fastcall GetTableNames(System::Classes::TStrings* List, bool SystemTables = false)/* overload */;
void __fastcall GetTableNames(System::Classes::TStrings* List, System::UnicodeString SchemaName, bool SystemTables = false)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr TSQLConnection

Description

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

Call GetTableNames to retrieve a list of tables in the associated database.

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

SystemTables specifies whether the list of table names should include only the database's system tables. If SystemTables is true, only the system tables are added to List. If SystemTables is false, the list is filled with any tables that match the criteria specified by the TableScope property.

For example, the following line fills a list box with the names of all data tables in the database:



SQLConnection1.GetTableNames(ListBox1.Items, False);



SQLConnection1->GetTableNames(ListBox1->Items, false);



See Also