UnlockObject (Command Interface)
[!REMARQUE]
Cette fonctionnalité sera supprimée dans la prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement, et modifiez dès que possible les applications qui utilisent actuellement cette fonctionnalité.
The UnlockObject method of the Command interface releases the lock previously established on a command object by the LockObject method.
Applies To:clsDatabaseCommand
Syntaxe
object.UnlockObject
Paramètres
- object
The object to unlock.
Notes
If an application that created one or more locks terminates before it can free them using the UnlockObject method, the Analysis server automatically releases the locks when the connection with the application is closed.
Exemple
The following example locks a command object so that it can be modified. It then unlocks the object and updates its repository information.
'Assume a command object (dsoCmd) exists.
dsoCmd.LockObect OlapLockRead, "Updating command, please wait."
' (Insert code to change command object here.)
dsoCmd.Update
dsoCmd.UnlockObject