EsbRemoveLocks() removes all data block locks on a Database which are currently held by a user.
EsbRemoveLocks (hCtx, AppName, DbName, LoginId)
ByVal hCtx As Long ByVal AppName As String ByVal DbName As String ByVal LoginId As Long
hCtx | Essbase VB API context handle. |
AppName | Application name. |
DbName | Database name. |
LoginId | id of user login whose locks are to be removed. |
Declare Function EsbRemoveLocks Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal LoginId As Long) As Long Sub ESB_RemoveLocks () Dim Items As Integer Dim AppName As String Dim DbName As String Dim LockInfo As ESB_LOCKINFO_T Dim sts As Long AppName = "Sample" DbName = "Basic" '*********** ' List Locks '*********** sts = EsbListLocks (hCtx, AppName, DbName, Items) '***************** ' Remove all locks '***************** For n = 1 To Items '******************************* ' Get next user lock structure ' from the list and remove locks '******************************* sts = EsbGetNextItem (hCtx, ESB_LOCKINFO_TYPE, LockInfo) sts = EsbRemoveLocks (hCtx, AppName, DbName, LockInfo.LoginId) Next End SubEsbListLocks()