skip to main content
Schema definition and management : Schema objects : Tables catalog table OA_TABLES
 

Tables catalog table OA_TABLES

The OA_TABLES table contains the table name, table owner, table type and descriptions of all tables that are accessible when connected to the associated IP. All tables that are defined as SYSTEM TABLE are managed by the CSV IP that is built into the OpenAccess SDK SQL engine. All other tables are defined to be of type TABLE and are managed by the associated IP. This table provides information for the catalog functions such as SQLTables in ODBC.
Table names can have a maximum length of 128 characters, must begin with a letter of the alphabet or underscore(_), and may contain alphanumeric characters and the following characters: _ @ # ^ $ & ~ %. Alphanumeric characters include a-z, A-Z and all Unicode characters that are not considered as punctuation, control or space characters. If identifier names contain spaces or any other special characters, client applications must use quoted identifiers to query these tables. If identifiers are quoted, then these restrictions do not apply; however, not all applications quote the identifiers.
The following table shows the OA_TABLES definition.
 
Table 22: Definition of OA_TABLES table  
Column name
Type
Len
Description
TABLE_QUALIFIER
WVARCHAR
128
The name of the database in which the table exists. It can be used to distribute tables into physically different databases. SCHEMA is normally used. If you want to expose this field as an empty value, then, the IP should return a 0 when IP GETINFO is called for SQL_MAX_QUALIFIER_NAME and you should supply NULL for this field.
TABLE_OWNER
WVARCHAR
128
The owner of the table. It is normally set to system or user.
SYSTEM—the table is managed by the OpenAccess SDK SQL engine.
OAUSER—the table is managed by the IP.
If you want to expose this field as an empty value to client applications, then, the IP should return a 0 when IP GETINFO is called for SQL_MAX_OWNER_NAME and you should supply NULL for this field.
TABLE_NAME
WVARCHAR
128
The name of the table. This is how the end user will refer to it.
TABLE_TYPE
WVARCHAR
128
Affects how the table is handled. Set to:
SYSTEM TABLE—this table is managed by the CSV IP.
TABLE—managed by the IP.
TABLE_PATH
WVARCHAR
254
The full pathname of the file that is holding this table (if any). The file name by itself defaults to the current directory. You can use the relative path specifier to define a file name relative to the schema path as defined in the DataSourceIPSchemaPath attribute.
Place a single dot (.) to indicate the schema directory.
Place a forward or backward slash and follow by rest of the name. For example: ./mem_db/test.dbf will expand to schema_path/mem_db/test.dbf, where schema_path is as defined in the DataSourceIPSchemaPath attribute.
OA_USERDATA
WVARCHAR
254
A place for the IP to maintain IP-specific data. The IP can read it by using the dam_describeTable function.
OA_SUPPORT
WVARCHAR
128
A place for the IP to maintain what functionality it supports for the table (such as SELECT, INSERT). The OpenAccess SDK SQL engine allows a user to perform only these operations for the table. This value will be used if the GETSUPPORT function returns false for that capability.
The value in this field is specified as a hex number with the 0x convention. It is bitwise OR of the following bit masks:
IP_TABLE_SUPPORT_SELECT 0x01
IP_TABLE_SUPPORT_INSERT 0x02
IP_TABLE_SUPPORT_UPDATE 0x04
IP_TABLE_SUPPORT_DELETE 0x08
IP_TABLE_SUPPORT_SELECT_FOR_UPDATE 0x10
For example, set this field to '0x1F' to indicate full support. This number is the result of 0x01 | 0x02 | 0x04 | 0x08 | 0x10 where the '|' indicates bitwise OR.
REMARKS
WVARCHAR
254
The description of the table
Note: The ordering of rows in this table and other tables in this chapter does not imply the same ordering of columns in the Schema Database. Please use explicit column names when inserting data using queries.