SE_table_describe

Returns column definitions for the specified table

Usage syntax

LONG SE_table_describe
(SE_CONNECTION connection,
const CHAR *table,
SHORT *num_columns,
SE_COLUMN_DEF
**column_defs);

Parameters
connection The connection handle
table The name of the DBMS table to describe
num_columns The number of columns in the table
column_defs The address of an unallocated SE_COLUMN_DEF pointer in which to return the column definitions
Description

SE_table_describe returns the definitions of all columns in the specified DBMS table. This function maps the underlying DBMS data types to ArcSDE data types. Column definitions are defined in an SE_COLUMN_DEF structure 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 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 */

SE_SHAPE_TYPE           /* Feature structure */

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

Returns

SE_SUCCESS
SE_CONNECTION_IN_USE

SE_CONNECTION_LOCKED

SE_DB_IO_ERROR

SE_INVALID_PARAM_VALUE

SE_INVALID_POINTER

SE_NET_FAILURE

SE_OUT_OF_CLMEM

SE_OUT_OF_SVMEM

SE_SDE_NOT_STARTED

SE_TABLE_NOEXIST

Notes

∙  The columns argument allocates an array of SE_COLUMN_DEF structures. Deallocate them by calling SE_table_free_descriptions.