Database.TableSchema

From Xojo Documentation

Method

Database.TableSchema() As RecordSet

Supported for all project types and targets.

Returns a RecordSet with a list of all tables in the database.

Notes

TableSchema returns a RecordSet with one field: TableName As String.

Sample Code

The following code gets the TableSchema for the connected database and displays each table name:

// App.DB is a connected database
Dim tables As RecordSet
tables = App.DB.TableSchema

If tables <> Nil Then
While Not tables.EOF
MsgBox(tables.IdxField(1).StringValue)
tables.MoveNext
Wend
tables.Close
End If

See Also

Database.FieldSchema method