DbTableNames(connectionString, cat, sch, tab, typ)

Connects to an ODBC data source and returns catalog data for the data source.

«ConnectionString» specifies a data source (e.g., 'DSN = MyDatabase'). «Cat» (catalog names), «sch» (schema names), «tab» (table names), and «typ» (table types) may be patterns if your ODBC driver manager is ODBC 3 compliant.

Use ‘%’ as a wildcard in each field to match zero or more characters. Underscore, ‘_’, matches one character. Most drivers use backslash ('\') as an escape character, so that the characters ‘%’, ‘_’, or ‘\’ as literals must be entered as ‘\%’, ‘\_’, or ‘\\’.

«Typ» may be a comma-delimited list of table types. Your data source and ODBC driver may or may not support this call to varying degrees.


To get all valid catalog names in My db:

DBTableNames(‘DSN = My db’, ’%’, ’’, ’’, ’’)

To get all valid schemas in My db:

DBTableNames(‘DSN = My db’,’ ’, ’%’, ’’, ’’)

To get all valid table names in My db:

DbTableNames(‘DSN = My db’,’’,’’,’%’,’’)

To get all valid table types:

DbTableNames(‘DSN = My db’, ’’, ’’, ’’, ’%’)

See Also


You are not allowed to post comments.