TableSchemaInfo() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

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:

TableInfo() function