Possibility of Adding or Removing Objects

Not all collections support possibility to add and remove objects. For some collections, an object will be added to the collection at its creation (e.g., the GeoDatabase object is added automatically to the GDBEngine::GeoDatabases collection when GDB is opened by the GDBEngine::OpenGDB method). The open mode of GDB, which is direct or indirect owner of collection, influences the possibility to add and remove an object as well (e.g., adding or removing the Table object to the GeoDatabase::Tables collection (from the collection) is impossible if GDB, the owner of collection, is opened on shared access). Objects are removed from some collections when they are closed by the Close method (e.g., the GeoDatabase object is removed from the GDBEngine::GeoDatabases collection when GDB is closed by the GeoDatabase::Close method). For some collections, the set of objects is formed by kernel of GIS and such collections do not support possibility to add or remove objects (e.g., the GeoDatabase::Sessions collection contains the Session objects which are descriptors of shared access sessions). The table below defines possibility to add and remove objects by the Append and Delete methods of collections.

Collection

Adding

Removing

DataLink::IndirectFieldsPairs

Possible if the DataLink::LinkCategory property returns gdbLinkIndirect.

Possible if the DataLink::LinkCategory property returns gdbLinkIndirect.

ExternalDatabase::Queries

Possible

Possible

ExternalDatabase::Recordsets

Impossible

Impossible

ExternalDatabase::Tables

Impossible

Possible

Feature::Themes

Possible if a theme is cataloged and a feature belongs to GDB map layer.

Possible

FeatureType::DataLinks

Possible when exclusive access to GDB. When shared access, possible if a link descriptor is based on a table or query that belongs to an uncataloged external database.

Possible when exclusive access to GDB. When shared access, possible if a link descriptor is based on a table or query that belongs to an uncataloged external database.

FeatureType::FilterGroups

Possible if a layer, the owner of feature type, belongs to the collection Theme::Layers.

Possible if a layer, the owner of feature type, belongs to the collection Theme::Layers.

Field::PrimaryKeys

Impossible

Impossible

ForeignKey::Fields

Impossible

Impossible

GDBEngine::ExternalDatabaseErrors

Impossible

Impossible

GDBEngine::GeoDatabases

Impossible

Impossible

GeoDatabase::ExternalDatabases

Possible

Possible. When shared access to GDB, possible for uncataloged external databases only. An external database must be closed.

GeoDatabase::Featuresets

Impossible

Impossible

GeoDatabase::Layouts

Possible

Possible

GeoDatabase::Maps

Possible when exclusive access to GDB

Possible when exclusive access to GDB

GeoDatabase::Queries

Possible

Possible

GeoDatabase::Recordsets

Impossible

Impossible

GeoDatabase::Sessions

Impossible

Impossible

GeoDatabase::Tables

Possible when exclusive access to GDB

Possible when exclusive access to GDB

GeoDatabase::TemporaryTables

Possible

Possible

GeoDatabase::Themes

Possible

Possible

GeoDatabase::Users

Possible when exclusive access to GDB

Possible when exclusive access to GDB

Layer::FeatureTypes

Possible when exclusive access to GDB

Possible when exclusive access to GDB

Layout::Elements

Possible

Possible

LayoutChartLegend::Keys

Impossible

Impossible

Legend::LegendItems

Impossible

Impossible

LegendItem:: LegendItems

Impossible

Impossible

Library::FillStyles

Possible

Possible

Library::Fonts

Possible

Possible

Library::HatchStyles

Possible

Possible

Library::LineStyles

Possible

Possible

Library::MapSymbols

Possible

Possible

Map::Layers

Possible when exclusive access to GDB

Possible when exclusive access to GDB

PrimaryKey::Fields

Impossible

Impossible

Query::Fields

Impossible

Possible for calculated fields only

Query::FieldSearchConditions

Possible

Possible

Query::FieldSortConditions

Possible

Possible

Query::SQLParameters

Possible

Possible

Recordset::Fields

Impossible

Impossible

Recordset::KeyFields

Possible for recordsets based on external tables or queries only.

Impossible

Recordset::SQLParameters

Impossible

Impossible

SharedLibrary::FillStyles

Possible

Possible

SharedLibrary::Fonts

Possible

Possible

SharedLibrary::HatchStyles

Possible

Possible

SharedLibrary::LineStyles

Possible

Possible

SharedLibrary::MapSymbols

Possible

Possible

SharedLibrary::Sessions

Impossible

Impossible

Table::Fields

Possible when exclusive access to GDB

Possible when exclusive access to GDB

Table::ForeignKeys

Impossible

Impossible

Table::PrimaryKeys

Impossible

Impossible

Table::SpecialFields

Impossible

Impossible

Table::TableIndexes

Impossible

Impossible

TableIndex::Fields

Impossible

Impossible

Theme::FeaturesetConditions

Possible

Possible

Theme::Layers

Possible

Possible

Theme::ScaleZones

Possible

Possible