Creates an object data table.
int
ade_oddefinetab(
struct resbuf* tab_defn);
Returns RTNORM or an error code
| tab_defn | List of table elements: the table name, the table description, and a sequence field definitions. |
The following sample creates a resbuf containing table defenition parameters. ade_oddefinetab() uses this resbuf and returns a result code indicating the success of the operation. Then it releases the resbuf, as required.
struct resbuf* pOdTableDefRb = acutBuildList(
RTLB,
RTSTR, "tablename", RTSTR, "NEWTABLE",
RTDOTE,
RTLB,
RTSTR, "tabledesc", RTSTR, "New Sample Table",
RTDOTE,
RTLB,
RTSTR, "columns",
RTLB,
RTLB,
RTSTR, "colname", RTSTR, "FIELD1",
RTDOTE,
RTLB,
RTSTR, "coldesc", RTSTR, "Field 1 Description",
RTDOTE,
RTLB,
RTSTR, "coltype", RTSTR, "character",
RTDOTE,
RTLB,
RTSTR, "defaultval", RTSTR, "Default Value",
RTDOTE,
RTLE,
// Define more fields as needed
RTLE,
0);
int nResultCode = ade_oddefinetab(pOdTableDefRb);
if (RTNORM == nResultCode) {
acutPrintf(
"\nThe specified table has been successfully created.");
}
else {
acutPrintf(
"\nThe specified table has not been created.");
}
acutRelRb(pOdTableDefRb);


