Xbasic

SQL::ConnectionListTables Method

Syntax

Table_List as C = ListTables([TableFilter as SQL::TableFilter])

Table_List as C = ListTables( [ IncludeTables as L [, IncludeViews as L [, IncludeSystemTables as L [, IncludeSynonyms as L [, IncludeAliases as L ]]]]] )

Arguments

TableFilterSQL::TableFilter

SQL::TableFilter

IncludeTables Logical

Default = .T. (TRUE) = Include tables

IncludeViews Logical

Default = .F. (FALSE) = Include views

IncludeSystemTables Logical

Default = .F. (FALSE) = Include system tables

IncludeSynonyms Logical

Default = .F. (FALSE) = Include synonyms

IncludeAliases Logical

Default = .F. (FALSE) = Include aliases

Returns

The retrieved list of tables.Character

Table_List

Description

Return a list of tables for the current database.

The ListTables() method returns a list of tables for the current database.

The overload below is obsolete. Use a TableFilter argument instead. See About ListTables and ListTablesWithTypes for more information.
C ListTables( [IncludeTables as L [, IncludeViews as L [, IncludeLinkedTables as L [, IncludeSystemTables as L [, IncludeSynonyms as L [, IncludeAliases as L]]]]]])

Example 

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", conn.ListTables(.T., .T., .T., .T., .T.))
conn.close()

Example Usage:

dim Filter as SQL::TableFilter
	Filter.IncludeViews = .t.
	Connection.ListTables(Filter)

See Also