ODBCTables

(Engine-Level Function)

Description: Retrieves a list of the tables present in an ODBC-compliant database and returns it as a dynamically allocated array.
Returns: Array
Usage: Script Only.
Function Groups: Database and Data Source,  ODBC
Related to: ODBC | ODBCConfigureData | ODBCConnect | ODBCDisconnect | ODBCSources | ODBCStatus | TODBC | TODBCConnect | TODBCDisconnect
Format: ODBCTables(DB [, Search][, TableType])
Parameters:  
DB
Required. An ODBC value for the ODBC database as returned by ODBCConnect.
Search
An optional parameter which is any text string indicating the pattern to match for table names.

If this parameter is omitted, the search pattern defaults to "%", where the percent sign is the SQL wildcard (i.e. all table names are returned).
TableType
An optional parameter which is a list of table types to match. Parameters include the following:
"TABLE", "VIEW", "SYSTEM TABLE",..., or a data source-specific type name.
Comments: If TableType is not an empty string, it must contain a list of comma-separated values for the types of interest. Each value may be enclosed in single quotation marks (') or unquoted for example, 'TABLE', 'VIEW' or TABLE, VIEW. An application should always specify the table type in uppercase. If the data source does not support a specified table type, no results will be returned for that type

Example:

If 1 Next;
[
  tables = ODBCTables(dBase, "Analog%");
]

This will obtain the list of all tables in the database beginning with the string "Analog".