dam_add_damobj_table
- Last Updated: May 12, 2026
- 5 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
This function is used to return schema information about tables. Add a table schema object with the specified values to the list of objects returned to the OpenAccess SDK SQL engine. Use the Unicode versions when using this function: OAIP_schemaW or OAIP_schemaExW.
All values should be set. Set Null values as follows:
- For char *, set the pointer to NULL.
- For integer, set the value to DAMOBJ_NOTSET.
Refer to Schema Definition and Management in OpenAccess SDK Programmer's Guide for details about each of the values to set.
int dam_add_damobj_table(
XM_Tree * pMemTree,
DAM_OBJ_LIST pList,
DAM_OBJ pSearchObj,
char * table_qualifier,
char * table_owner,
char * table_name,
char * table_type,
char * table_path,
char * table_userdata,
char * function_support,
char * remarks)
Parameters for dam_add_damobj_table
| Parameter | Type | Description |
| IN | ||
| pMemTree | XM_Tree * | The memory tree on which to allocate memory for the new object. |
| pList | DAM_OBJ_LIST | The list on which the objects are to be added. It is passed in the call to the IP. The IP can pass the pSearchObj filter to have the OpenAccess SDK SQL engine filter the objects before adding to the list. |
| pSearchObj | DAM_OBJ | The object to use for filtering the objects added to the list. If you have taken care of only adding the objects that are requested, then set this to NULL. If you want the OpenAccess SDK SQL engine to do the filtering, then pass in the same value as passed into your IP. |
| table_qualifier | char * | The name of the database in which the table falls. Can be used to distribute tables into physically different databases. You would normally specify SCHEMA. If you want to expose this field as an empty value, then return 0 when OAIP_getInfo(SQL_MAX_QUALIFIER_NAME) is called and set this field value to NULL. |
| table_owner | char * | The owner of the table. You would normally set it to system or user. SYSTEM - the table is managed by the OpenAccess SDK SQL engine. OAUSER - the table is managed by the IP. The value for this parameter and OA_COLUMNS must match.If you want to expose this field as an empty value, then return 0 when OAIP_getInfo(SQL_MAX_OWNER_NAME) is called and set this field value to NULL. |
| table_name | char * | The name of the table. This is how the end user refers to it. |
| table_type | char * | Affects how the table is handled. Set to: SYSTEM TABLE - This table is managed by the CSV IP. TABLE - The table is managed by the IP. TABLE FUNCTION - The table function is managed by the IP. |
| table_path | char * | The full pathname of the file holding this table (if any). 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 data source attribute. Place a single period (.) to indicate the schema directory. Place a forward or backward slash and follow by remainder of the name. For example: ./mem_db/test.dbf expands to {schema_path}/mem_db/test.dbf, where schema_path is as defined in the DataSourceIPPath data source attribute. |
| table_userdata | char * | A place for the IP to maintain IP-specific data. The IP can read it by using the dam_describeTable/dam_describeTableW function. |
| function_support | char * | A place for the IP to maintain what functionality it supports for the table (SELECT, INSERT and so on). The OpenAccess SDK SQL engine allows a user to perform only these operations for the table. This value is 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 | char * | The description of the table. |
| RETURN | ||
| int | Function call status: DAM_SUCCESS - values set. DAM_FAILURE - values not set. One of the values was null when it cannot be. |
int dam_add_damobj_tableW(
XM_Tree * pMemTree,
DAM_OBJ_LIST pList,
DAM_OBJ pSearchObj,
OAWCHAR * table_qualifier,
OAWCHAR * table_owner,
OAWCHAR * table_name,
OAWCHAR * table_type,
OAWCHAR * table_path,
OAWCHAR * table_userdata,
OAWCHAR * function_support,
OAWCHAR * remarks)
Parameters for dam_add_damobj_tableW
| Parameter | Type | Description |
| IN | ||
| pMemTree | XM_Tree * | The memory tree on which to allocate memory for the new object. |
| pList | DAM_OBJ_LIST | The list on which the objects are to be added. It is passed in the call to the IP. The IP can pass the pSearchObj filter to have the OpenAccess SDK SQL engine filter the objects before adding to the list. |
| pSearchObj | DAM_OBJ | The object to use for filtering the objects added to the list. If you have taken care of only adding the objects that are requested, then set this to NULL. If you want the OpenAccess SDK SQL engine to do the filtering, then pass in the same value as passed into your IP. |
| table_qualifier | OAWCHAR * | The name of the database in which the table falls. Can be used to distribute tables into physically different databases. You would normally specify SCHEMA. If you want to expose this field as an empty value, then return a 0 when OAIP_getInfo(SQL_MAX_QUALIFIER_NAME) is called and set this field value to NULL. |
| table_owner | OAWCHAR * | The owner of the table. You would normally set it to system or user. SYSTEM - the table is managed by the OpenAccess SDK SQL engine. OAUSER - the table is managed by the IP. In future releases, this entry will be used to control access rights to the table and will represent the actual user who owns the table. The entry in here and in the OA_COLUMNS must match. If you want to expose this field as an empty value, then return 0 when OAIP_getInfo(SQL_MAX_OWNER_NAME) is called and set this field value to NULL. |
| table_name | OAWCHAR * | The name of the table. This is how the end user refers to it. |
| table_type | OAWCHAR * | Affects how the table is handled. Set to: SYSTEM TABLE - This table is managed by the CSV IP. TABLE - The table is managed by the IP. |
| table_path | OAWCHAR * | The full pathname of the file holding this table (if any). 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 DataSourceIPPath data source attribute. Place a single period (.) to indicate the schema directory. Place a forward or backward slash and follow by remainder of the name. For example: ./mem_db/test.dbf expands to {schema_path}/mem_db/test.dbf, where schema_path is as defined in the DataSourceIPPath data source attribute. |
| table_userdata | OAWCHAR * | A place for the IP to maintain IP-specific data. The IP can read it by using the dam_describeTable/dam_describeTableW function. |
| function_support | OAWCHAR * | A place for the IP to maintain what functionality it supports for the table (SELECT, INSERT and so on). The OpenAccess SDK SQL engine allows a user to perform only these operations for the table. This value is 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 | OAWCHAR * | The description of the table. |
| RETURN | ||
| int | Function call status:DAM_SUCCESS - values set DAM_FAILURE - values not set. One of the values was null when it cannot be. |