Update (Command Interface)

[!附註]

  下一版的 Microsoft SQL Server 將不再提供此功能。請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。

The Update method of the Command interface saves the definition of a command object in the metadata repository.

Applies To:clsDatabaseCommand

語法

object.Update

參數

  • object
    The command object to update.

備註

Use this method when you want to save changes to an object. Any changes made to an object will have session scope until this method is executed.

範例

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

請參閱

參考