SE_state_archive_tables

Saves features to the history table

Usage syntax

LONG SE_state_archive_tables (SE_CONNECTION connection, LONG low_state_id, LONG high_state_id, Struct tm *archive_time);

Parameters
connection The connection handle
low_state_id The low state ID
high_state_id The high state ID; child of low_state_id
archive_time The database time recorded at the time the archive operation begins; generated by ArcSDE
Description

An archiving table is a versioned table that supports historical archiving. The archive operation makes use of the table’s versioning information. Archived rows are stored in a history table, named by the user. ArcSDE maintains identical schemas between the archiving table and its associated history table. Changes made to the archiving table, such as adding/dropping columns, spatial columns, and xml columns are propagated to the history table. The history table will have its own side tables for storing shapes and xml documents, and will be in the list of tables and layers in the database. If an archiving table is later unversioned, or deleted, the history table is not deleted, and can still be queried.

The archive operation is used to save rows to the history table. It takes as input a low state, and a high state, where the high state is the child of the low state. For each archiving table that has been modified between the low state and the high state, changes in that table are stored into that table's associated history table. The same timestamp is used for all archived rows in a given archive operation. This timestamp is the database time recorded at the time the archive operation begins.

Returns

SE_SUCCESS
SE_CONNECTION_IN_USE

SE_CONNECTION_LOCKED

SE_DB_IO_ERROR

SE_INVALID_STATE_ID

SE_NET_FAILURE

SE_NO_PERMISSIONS

SE_SDE_NOT_STARTED

SE_STATE_HAS_CHILDREN

SE_STATE_INUSE