RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSession.GetTableNames Method

Populates a string list with the names of tables associated with a specified database component.

Pascal
procedure GetTableNames(const DatabaseName: string; const Pattern: string; Extensions: Boolean; SystemTables: Boolean; List: TStrings);
C++
__fastcall GetTableNames(const AnsiString DatabaseName, const AnsiString Pattern, Boolean Extensions, Boolean SystemTables, TStrings List);

Call GetTableNames to retrieve a list of the tables associated with a given database. DatabaseName specifies the name of the database from which to retrieve table names. 

Pattern specifies a delimiter string that restricts the tables returned to those that match the string. Pattern can include wildcard symbols. Pass an empty Pattern string to match all files not restricted by other criteria. 

For searches on Paradox and dBASE, set Extensions to true to include filename extensions as part of the table name. For SQL-based databases, set Extension to false. 

Set SystemTables to true for SQL-based databases to return both data tables and the system tables that define the database structure. Set SystemTables to false for Paradox and dBASE tables. 

List is a string list object, created and maintained by the application, into which to return the table names. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!