Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

DDL function

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

When the DDL function in the IP is called, the DDL function should perform the following steps:

  1. Get information about the table (name, owner, qualifier).

    pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_TABLE);

    damobj_table pTableObj = getFirstSchemaObject(pList);

  2. Get column definitions.

    pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_COLUMN);

    damobj_column pColumnObj = dam_getFirstSchemaObject(pList);

    while ( pColumnObj ){

    pColumnObj = dam_getNextSchemaObject(pList);

    /* get the column attributes */

    }

  3. Get the index definition.

    pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_STAT);

    damobj_stat pStatObj = dam_getFirstSchemaObject(pList);

    while ( pStatObj ){

    /* get the index information from pStatObj */

    pStatObj = dam_getNextSchemaObject(pList);

    }

  4. Get foreign keys information

    pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_FKEY);

    damobj_stat pFkeyObj = getFirstSchemaObject(pList);

    while ( pFkeyObj ){

    pFkeyObj = dam_getNextSchemaObject(pList);

    /* get the foreign key attributes */

    }

  5. Use the supplied table, columns and foreign keys information to create your table.

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