SE_table_create |
Creates a DBMS table
LONG SE_table_create
(SE_CONNECTION connection,
const CHAR *table,
SHORT num_columns,
const SE_COLUMN_DEF
*column_defs,
const CHAR *config_keyword);
connection | The connection handle |
table | The name of the table to create |
num_columns | The number of columns in the table |
column_defs | An array of SE_COLUMN_DEF structures defining the columns of the table |
config_keyword | A configuration keyword entry from the DBTUNE table. Each keyword corresponds to a set of DBMS specific tuning parameters. Please refer to the ArcGIS Server or ArcGIS Desktop help topic "What are DBTUNE configuration keywords and parameters?" for more information on setting up the DBTUNE parameters. |
SE_table_create creates a DBMS table that is not spatially enabled. The columns are defined by an array of SE_COLUMN_DEF structures. Column definitions are defined as:
typedef struct {
CHAR column_name[SE_MAX_COLUMN_LEN]; /* The column name */
LONG sde_type; /* The SDE data type */
LONG size; /* The size of the column values */
SHORT decimal_digits; /* Number of digits after decimal */
BOOL nulls_allowed; /* Allow NULL values */
SHORT row_id_type; /* The column's row id type. This parameter
is read-only. ArcSDE sets it internally whenever
the table is described. */
} SE_COLUMN_DEF;
The allowed column types (sde_type) are:
SE_SMALLINT_TYPE /* 2-byte integer */
SE_INTEGER_TYPE /* 4-byte integer */
SE_FLOAT_TYPE /* 4-byte float */
SE_DOUBLE_TYPE /* 8-byte float */
SE_STRING_TYPE /* Null term. Character array */
SE_BLOB_TYPE /* Variable length data */
SE_DATE_TYPE /* Struct tm date */
The row id types are:
SE_REGISTRATION_ROW_ID_COLUMN_TYPE_SDE
SE_REGISTRATION_ROW_ID_COLUMN_TYPE_USER
SE_REGISTRATION_ROW_ID_COLUMN_TYPE_NONE
You cannot create a column of type SE_SHAPE_TYPE with this function. If you wish to create a shape column, create it as an SE_INTEGER_TYPE and use SE_layer_create to spatially enable it.
Several restrictions exist on the size and decimal_digits variables. The small integer and integer types require that decimal_digits value is equal to zero, while float and double need a decimal_digits value of greater than zero. The size also has required ranges.
If you set the size and decimal_digits parameters of the SE_COLUMN_DEF structure as zeroes, the default values for the data type are used.
SE_SUCCESS
SE_CONNECTION_IN_USE
SE_CONNECTION_LOCKED
SE_DB_IO_ERROR
SE_INVALID_COLUMN_DEF
SE_INVALID_COLUMN_TYPE
SE_INVALID_PARAM_VALUE
SE_INVALID_POINTER
SE_NET_FAILURE
SE_OUT_OF_SVMEM
SE_SDE_NOT_STARTED
SE_TABLE_EXISTS
• Use the configuration keyword to control the disk layout of the table such as the initial extents.