DtvLong dal_mdb_cre_tab (tab_nam)

Creates in the data base the table with the passed name from the entries in the system entities T_TABLE and T_FIELD and the system relation T_TAB_FLD. Any defined indices are also created.

Input Parameters Significance
char *tab_nam name of the table

Output Parameters Significance
no -

Return Code Significance
0 no error
1 table not registered in DataView data dictionary
2 table fields not defined
3 wrong column data type
4 table already exists
10 no record foreign key defined
-1 data base error creating the table

Before executing this function the table must be entered in the DataView data dictionary (i.e.as entity, relation, or type).

Depending on the usage in the DataView data dictionary, the following internal system fields and indices are automatically created when creating a DataView table (no foreign format table):

For all tables:

Additionally when used as type table

Additionally when used as relation table

While in case of relation tables no own fields have to be defined, this leads to an abortion in case of entity- and type tables as well as foreign format tables.