UnlockObject (Command Interface)

ms135640.note(zh-cn,SQL.90).gif注意:
  下一版本的 Microsoft SQL Server 将删除该功能。请不要在新的开发工作中使用该功能,并尽快修改当前还在使用该功能的应用程序。

The UnlockObject method of the Command interface releases the lock previously established on a command object by the LockObject method.

Applies To:clsDatabaseCommand

语法

object.UnlockObject

参数

  • object
    The object to unlock.

备注

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.

示例

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

请参阅

参考

Command Interface

帮助和信息

获取 SQL Server 2005 帮助