Difference between revisions of "DbTableNames"

 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
#REDIRECT [[DbTablenames]]
+
[[Category:Database Functions]]
 +
[[Category:Doc Status D]] <!-- For Lumina use, do not change -->
 +
 
 +
== 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., <code>'DSN = MyDatabase'</code>). «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 <code>‘%’</code> as a wildcard in each field to match zero or more characters. Underscore, <code>‘_’</code>, matches one character. Most drivers use backslash (<code>'\'</code>) as an escape character, so that the characters <code>‘%’, ‘_’</code>, or <code>‘\’</code> as literals must be entered as <code>‘\%’, ‘\_’,</code> or <code>‘\\’</code>.
 +
 
 +
«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.
 +
 
 +
== Examples ==
 +
To get all valid catalog names in <code>My db</code>:
 +
:<code>DBTableNames(‘DSN = My db’, ’%’, ’’, ’’, ’’)</code>
 +
 
 +
To get all valid schemas in <code>My db</code>:
 +
:<code>DBTableNames(‘DSN = My db’,’ ’, ’%’, ’’, ’’)</code>
 +
 
 +
To get all valid table names in <code>My db</code>:
 +
:<code>DbTableNames(‘DSN = My db’,’’,’’,’%’,’’)</code>
 +
 
 +
To get all valid table types:
 +
:<code>DbTableNames(‘DSN = My db’, ’’, ’’, ’’, ’%’)</code>
 +
 
 +
==See Also==
 +
* [[DbTable]]
 +
* [[DbQuery]]
 +
* [[DbLabels]]
 +
* [[Database functions]]
 +
* [[Database access]]
 +
* [[Querying Access database from Analytica 64]]

Latest revision as of 00:00, 30 January 2016


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.

Examples

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

Comments


You are not allowed to post comments.