Purpose
Returns specific information about a schema of an open table. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
TableSchemaInfo( tableAlias, schemaIndex, schemaInfoCode )
tableAlias is the "alias" name of an open table.
schemaIndex is the index of schema for which you need information. The index value may range from 1 to the count of schemas. See TableInfo() function for identifying the count of schemas for the open table.
If an invalid schemaIndex is supplied, an error will occur when executing the command.
schemaInfoCode is a code indicating the type of information to return; see table below.
Return Value
String.
Description
The TableSchemaInfo() function returns one piece of information about a schema of an open table. A table can potentially have more than one schemas. This command can be used to get information about each schema that a table has.
The schemaIndex is a value that represents the index of schema of an open table for which you want information. You can obtain the count of available schemas by calling the TableInfo() function with the TAB_INFO_SCHEMAS_COUNT attribute. If an invalid schemaIndex is supplied, an error will occur when executing the command.
The schemaInfoCode parameter can be any value from the table below. Codes in the left column are defined in MAPBASIC.DEF.
connectionInfoCode code | ID | TableConnectionInfo() returns |
---|---|---|
TABLE_SCHEMA_INFO_NAME | 1 | String result, indicating the schema name. |
Examples
The following example will return the name of the first schema of the table.
TableSchemaInfo(tableAlias, 1, 1)
The following example will return the name of the second schema of the table.
TableSchemaInfo(tableAlias, 2, 1)
See Also: