Name
sql_tables — get list of tables from remote DSN
Synopsis
vector
sql_tables
(
|
in dsn varchar , |
in qualifier varchar , | |
in owner varchar , | |
in table_name varchar , | |
in
tabletype
varchar
) ; |
Description
This function corresponds to the ODBC catalog call of similar name. It and related functions are used by the virtual database to query remote data dictionaries.
The dsn argument must refer to a dsn previously defined by vd_remote_data_source or ATTACH TABLE.
The qualifier argument corresponds to the szTableQualifier and cbTableQualifier arguments of an ODBC catalog function. A SQL NULL value corresponds to the C NULL value. The arguments can contain % signs, which are interpreted as in LIKE.
Parameters
As defined in ODBC API for the corresponding catalog call.
Return Types
As defined in ODBC API for the corresponding catalog call.
This function returns an array, with one element for each row of the result set. Each row is represented as an array with one element for each column.
Examples
Example 24.397. Simple example
dbg_obj_print (sql_tables ('Local Virtuoso', 'Demo', NULL, NULL, NULL)); -> ( ("Demo" "demo" "Categories" "TABLE" <DB NULL> ) ("Demo" "demo" "Customers" "TABLE" <DB NULL> ) ("Demo" "demo" "Employees" "TABLE" <DB NULL> ) ("Demo" "demo" "Order_Details" "TABLE" <DB NULL> ) ("Demo" "demo" "Orders" "TABLE" <DB NULL> ) ("Demo" "demo" "Products" "TABLE" <DB NULL> ) ("Demo" "demo" "Shippers" "TABLE" <DB NULL> ) ("Demo" "demo" "Suppliers" "TABLE" <DB NULL> ) )
See Also
sql_data_sources
,
sql_columns
sql_primary_keys
,
sql_gettypeinfo
,
sql_statistics
.