This document is archived and information here might be outdated.  Recommended version.

ISchemaLock Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IS > ISchemaLock Interface
ArcGIS Developer Help

ISchemaLock Interface

Provides access to members for accessing schema locking functionality.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

When To Use

Use ISchemaLock to establish an exclusive lock on a dataset when changing its schema, or performing other operations that require exclusive access to the data.


Name Description
Method ChangeSchemaLock Changes a schema lock.
Method GetCurrentSchemaLocks The list of current locks.

Classes that implement ISchemaLock

Classes Description
CadastralFabric (esriGeoDatabaseExtensions) A container for querying information about a cadastral fabric.
CodedValueDomain Esri Attribute set constraint object.
FeatureClass Esri Feature Class object.
FeatureDataset Esri Feature Dataset object.
GeometricNetwork Esri Geometric Network object.
MosaicDataset (esriDataSourcesRaster) A mosaic dataset object.
NetworkDataset A container for querying information about a network dataset.
ObjectClass Esri Object Class object.
RangeDomain Esri Range Domain object.
RasterCatalog A collection of raster datasets in a Geodatabase table.
RepresentationClass A Feature Class Representation object.
SchematicDataset (esriSchematic) Provides access to members that manage the schematic dataset.
SchematicDiagram (esriSchematic) A schematic diagram object.
SchematicDiagramClass (esriSchematic) Schematic diagram class object.
SchematicElementClass (esriSchematic) Schematic element class object.
SchematicFolder (esriSchematic) A schematic folder object.
SchematicInMemoryFeatureClass (esriSchematic) Schematic in memory feature class object.
StreetNetwork A container for describing a street network.
Table Esri Table object.
Terrain (esriGeoDatabaseExtensions) The Esri Terrain component.
Topology Esri Topology object.
UtilityNetwork A container for describing a utility network.


The ISchemaLock interface can be used to establish a shared lock on data.  When accessing data using the ArcGIS application, shared locks are applied automatically. Exclusive locks are never applied automatically, and when performing an action that requires an exclusive hold on the data, you must apply an exclusive lock.
Examples of operations that should acquire a schema lock include adding a field to a feature class, associating a new class extension with a feature class, or building a geometric network on a set of feature classes.
When obtaining an exclusive schema lock on a personal geodatabase; any open row sets from the specific personal geodatabase will be invalidated; such as a cursor populated through the IFeatureClass.Search method.  For this reason; the exclusive schema lock should be obtained prior to populating a row set; such as cursors.

See Also

ISchemaLockInfo Interface | IDataset Interface | IEnumSchemaLockInfo Interface

.NET Samples

Tabbed feature inspector Get and set key properties on a mosaic dataset Tabbed feature inspector Timestamper class extension