LockObject (clsMiningModel)
The LockObject method of an object of ClassType clsMiningModel locks a mining model to prevent multiple users from concurrently changing the object.
Syntax
object.LockObject(ByVal LockType As OlapLockTypes, ByVal LockDescription As String)
object
The object to lock.
LockType
One of the constants of the OlapLockTypes enumeration. For more information, see OlapLockTypes.
LockDescription
A string containing the description of the lock, available to other applications attempting to obtain a lock.
Remarks
It is sometimes possible for an application to request an additional lock on an already locked object. For example, other applications can request and receive an olapLockRead lock on an object already locked using the olapLockProcess lock.
Example
The following example updates an existing mining model and saves it. It then locks the model with an informational message and processes the model. After processing is complete, the model is unlocked.
dsoDmm.LastUpdated = Now
dsoDmm.Update
dsoDmm.LockObject olapLockProcess, "Processing the mining model in check-in test."
dsoDmm.Process processFull
dsoDmm.UnlockObject