Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

dam_add_damobj_column

  • Last Updated: May 12, 2026
  • 4 minute read
    • OpenAccess SDK
    • Version 8.1
    • Documentation

This function is used to return schema information about columns. Add a column schema object with the specified values to the list of objects returned to the OpenAccess SDK SQL engine. Use the Unicode versions of the schema functions (OAIP_schemaW or OAIP_schemaExW) when using this function.

All values should be set. Set Null values as follows:

  • For char *, set the pointer to NULL. 2* For integer, set the value to DAMOBJ_NOTSET.

Refer to Schema Definition and Management in the OpenAccess SDK Programmer's Guide for information about each of the values to set.

int dam_add_damobj_column(
    XM_Tree *     pMemTree, 
    DAM_OBJ_LIST  pList, 
    DAM_OBJ       pSearchObj,
    char *        table_qualifier, 
    char *        table_owner,
    char *        table_name, 
    char *        column_name, 
    short         data_type,
    char *        type_name, 
    long          char_max_length, 
    long          numeric_precision, 
    short         numeric_precision_radix, 
    short         numeric_scale, 
    short         nullable,
    short         scope, 
    char *        userdata, 
    char *        operator_support, 
    short         pseudo_column, 
    short         column_type, 
    char *        remarks)

Parameters for dam_add_damobj_column

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 that was passed into your IP.
table_qualifier char * The name of the database in which the table is created.
table_owner char * The owner of the table.
table_name char * The name of the table.
column_name char * The name of the column of the specified table.
data_type short Data type of this column.
type_name char * The X/Open column type.
char_max_length long Length in bytes of data transferred to the client in its default format.
numeric_precision long Maximum number of digits used by the data in the column.
numeric_precision_​radix short Reserved for future use.
numeric_scale short Total number of digits to the right of the decimal point.
nullable short Whether the column can be null.
scope short Scope of the SQL_BEST_ROWID column.
userdata char * Any proprietary data about the column that you want the IP to access. The IP calls dam_describeColDetail to get this information.
operator_support char * A place for the IP to maintain which operators it supports for conditions on this column (for example, =, >, LIKE), when this column is considered for a restriction or a search condition.
pseudo_column short Indicates whether the column is a pseudo column such as Oracle ROWID.
column_type short Defines the column type.
remarks char * The description of the column.
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_columnW(
    XM_Tree *     pMemTree,  
    DAM_OBJ_LIST  pList, 
    DAM_OBJ       pSearchObj,
    OAWCHAR *     table_qualifier,
    OAWCHAR *     table_owner,
    OAWCHAR *     table_name, 
    OAWCHAR *     column_name, 
    short         data_type,
    OAWCHAR *     type_name, 
    long          char_max_length,
    long          numeric_precision, 
    short         numeric_precision_radix, 
    short         numeric_scale,
    short         nullable,
    short         scope, 
    OAWCHAR *     userdata, 
    OAWCHAR *     operator_support,
    short         pseudo_column, 
    short         column_type, 
    OAWCHAR *     remarks);

Parameters for dam_add_damobj_columnW

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 them 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 object 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 that was passed into your IP.
table_qualifier OAWCHAR * The name of the database in which the table resides. 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 this parameter 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 a 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.
column_name OAWCHAR * The name of the column of the specified table.
data_type short Data type of this column.
type_name OAWCHAR * The XO column type.
char_max_length long Length in bytes of data transferred to the client in its default format.
numeric_precision long Maximum number of digits used by the data in the column.
numeric_precision_radix short Reserved for future use.
numeric_scale short Total number of digits to the right of the decimal point.
nullable short Whether the column can be null.
scope short Scope of the SQL_BEST_ROWID column.
userdata OAWCHAR * Any proprietary data about the column that you want the IP to access. The IP calls dam_describeColDetail to get this information.
operator_support OAWCHAR * A place for the IP to maintain which operators it supports for conditions on this column (for example, =, >, LIKE), when this column is considered for a restriction or a search condition.
pseudo_column short Indicates whether the column is a pseudo column such as Oracle ROWID.
column_type short Defines the column type.
remarks OAWCHAR * The description of the column.
RETURN
int Function call status:
DAM_SUCCESS - values set
DAM_FAILURE - values not set
One of the values was null when it cannot be.

See also

TitleResults for “How to create a CRG?”Also Available inAlert