SQL::ConnectionGetSchema Method
Syntax
Arguments
- BYREF SchemaSQL::Schema
A SQL::Schema object created with the DIM statement.
- TableOwnerCharacter
Default = "". The owner of the database.
- IncludeTablesLogical
Default = .T. Whether to include table definitions.
- IncludeViewsLogical
Default = .T. Whether to include view definitions.
- IncludeLinkedTablesLogical
Default = .T. Whether to include linked table definitions.
- IncludeSystemTablesLogical
Default = .T. Whether to include system table definitions.
- IncludeSynonymsLogical
Default = .T. Whether to include synonym definitions.
- IncludeAliasesLogical
Default = .T. Whether to include alias definitions.
Returns
- Result_FlagLogical
TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).
Description
Get a schema definition.
Discussion
The GetSchema() method returns a collection of the tables requested for the current database and optionally for those owned by a specific user.
Example
dim conn as SQL::Connection
dim sch as SQL::Schema
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
if .not. conn.GetSchema(sch)
ui_msg_box("Error", conn.CallResult.text)
end
end if
file.from_string("c:\schema.txt", sch.xml)
conn.close()See Also