IWorkspaceFactoryLockControl Interface

Manages Geodatabase Locking

Members

Name Description
Method DisableSchemaLocking All workspaces created and managed by the factory will have schema locking disabled.
Method EnableSchemaLocking All workspaces created and managed by the factory will have schema locking enabled.
Read-only property SchemaLockingEnabled Returns true if this factory has schema locking enabled.

IWorkspaceFactoryLockControl.DisableSchemaLocking Method

All workspaces created and managed by the factory will have schema locking disabled.

Public Sub DisableSchemaLocking ( _
)
public void DisableSchemaLocking (
);

Remarks

The DisableSchemaLocking method will first attempt to release any existing schema locks for this process. It will also set a state of the IWorkspaceFactory that informs all workspaces instantiated by that factory to disable schema locking.

It is important to understand that when schema locking is disabled on a workspace, it doesn’t invalidate the schema lock API. The methods related to this API such as ISchemaLock.ChangeSchemaLock() will not result in the acquiring of a schema lock on the desired object.

IWorkspaceFactoryLockControl.EnableSchemaLocking Method

All workspaces created and managed by the factory will have schema locking enabled.

Public Sub EnableSchemaLocking ( _
)
public void EnableSchemaLocking (
);

Remarks

The EnableSchemaLocking method is only needed if there is a need to turn schema locking �back on� after having called DisableSchemaLocking.

IWorkspaceFactoryLockControl.SchemaLockingEnabled Property

Returns true if this factory has schema locking enabled.

Public ReadOnly Property SchemaLockingEnabled As Boolean
public bool SchemaLockingEnabled {get;}

Remarks

The read-only SchemaLockingEnabled property allows a caller to determine if the factory currently has schema locking enabled or disabled.

Classes that implement IWorkspaceFactoryLockControl

Classes Description

Remarks

The IWorkspaceFactoryLockControl API must be used with extreme caution. Disabling schema locks can have adverse affects on all connected users. The disabling of schema locks not only prevents that workspace from establishing schema locks on an objects schema; it will also ignore any existing schema locks established by other processes.

This API is exposed at the workspace factory and allows for the Enabling and Disabling of schema locking on any workspace instantiated by the workspace factory. By default, schema locking is enabled on any workspace instantiated from a workspace factory.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.