SE_layer_delete

Deletes a layer

Usage syntax

LONG SE_layer_delete (SE_CONNECTION connection, const CHAR *table, const CHAR *column);

Parameters
connection The connection handle
table The table name
column The column name
Description

SE_layer_delete deletes the spatial components from a spatially enabled table.

For feature classes that have been implemented using the binary schema (Oracle and SQL Server only), deleting a feature class drops the DBMS spatial tables (the F and S tables), removes the definition of the feature class from the ArcSDE system tables COLUMN_REGISTRY, GEOMETRY_COLUMNS, and LAYERS, and drops the trigger on the spatial column. Under the SQL spatial types and functions implementations, the spatial column is unaltered, but the feature class definition is removed from the ArcSDE system tables COLUMN_REGISTRY, GEOMETRY_COLUMNS, and LAYERS. On SQL Server, the geometry side tables (used for CAD storage) are also dropped.

For all types of feature classes, the business table still exists in the database and is registered (a record still exists for it in the TABLE_REGISTRY table). To completely remove the business table after removing its spatial component, use SE_table_delete.

If the caller of this function is neither the owner of the table nor the ArcSDE administrator, an error is returned.

If an ArcSDE layer has become corrupted for some reason (e.g., the user has dropped one of the internal ArcSDE tables or deleted the layer definition record accidentally), SE_layer_delete still attempts to delete the layer.

Returns

SE_SUCCESS
SE_DB_IO_ERROR

SE_LAYER_NOEXIST

SE_LOCK_CONFLICT

SE_NET_FAILURE

SE_NO_PERMISSIONS

SE_OUT_OF_LOCKS

SE_SDE_NOT_STARTED

SE_STREAM_IN_PROGRESS

SE_TRANS_IN_PROGRESS

 

Tip

 Use SE_layer_truncate to delete features but retain the layer definition.