ArcFM Responder Mobile Developer Guide
ObtainExclusiveLock Method
Example 






The object to be locked.
Obtains an exclusive lock on a database resource.
Syntax
'Declaration
 
Public Function ObtainExclusiveLock( _
   ByVal obj As System.Object _
) As System.Boolean
'Usage
 
Dim instance As SchemaLocker
Dim obj As System.Object
Dim value As System.Boolean
 
value = instance.ObtainExclusiveLock(obj)
public System.bool ObtainExclusiveLock( 
   System.object obj
)
public function ObtainExclusiveLock( 
    obj: System.TObject
): System.Boolean; 
public function ObtainExclusiveLock( 
   obj : System.Object
) : System.boolean;
public: System.bool ObtainExclusiveLock( 
   System.Object* obj
) 
public:
System.bool ObtainExclusiveLock( 
   System.Object^ obj
) 

Parameters

obj
The object to be locked.

Return Value

True if exclusive lock succeeds, false otherwise.
Example
This example shows the typical usage of ObtainExclusiveLock
using(var schemaLocker = new SchemaLocker())
{   
     schemaLocker.ObtainExclusiveLock(objectClass);
     // modify schema of objectClass
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SchemaLocker Class
SchemaLocker Members

Send Feedback