SQL::ConnectionListTablesWithTypes Method
Syntax
Table_List as C = ListTablesWithTypes([TableFilter as SQL::TableFilter])
Table_List as C = ListTablesWithTypes( [ IncludeTables as L [, IncludeViews as L [, IncludeSystemTables as L [, IncludeSynonyms as L [, IncludeAliases as L ]]]]])
Arguments
- TableFilterSQL::TableFilter
SQL::TableFilter
- IncludeTables Logical
Optional. Default = .T. (TRUE) = Include tables
- IncludeViews Logical
Optional. Default = .F. (FALSE) = Include views
- IncludeSystemTables Logical
Optional. Default = .F. (FALSE) = Include system tables
- IncludeSynonymsLogical
Optional. Default = .F. (FALSE) = Include synonyms
- IncludeAliases Character
Optional. Default = .F. (FALSE) = Include aliases
Returns
- Table_List Character
The retrieved list of tables.
Description
Return a list of tables for the current database suffixed with (<type>).
Discussion
The ListTablesWithTypes() method returns a list of tables for the current database suffixed with type.
dim cn as sql::connection ?cn.open("::Name::SQLServerNorthwind") dim Filter as SQL::TableFilter Filter.IncludeViews = .t. Filter.IncludeSystemTables = .t. ?cn.listtableswithtypes(Filter)
The next example uses the old, obsolete method of passing in options. You should prefer the method above that uses a SQL::TableFilter object specify the types of tables to list. See About ListTables and ListTablesWithTypes for more information.
dim conn as SQL::Connection dim connString as C connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}" if .not. conn.open(connString) ui_msg_box("Error", conn.CallResult.text) end end if ui_msg_box("Tables and Types", conn.ListTablesWithTypes(.t.,.t.,.t.,.t.,.t.)) conn.close()
See Also