Clone (Command Interface)
[!附註]
下一版的 Microsoft SQL Server 將不再提供此功能。請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。
The Clone method of the Command interface copies the properties of an existing object to a target object of the same class type. The target object must exist prior to using the Clone method.
Applies To:clsDatabaseCommand
語法
object.Clone(ByVal TargetObject As Command, [ByVal Options As CloneOptions = cloneMajorChildren])
參數
object
The object whose property values are to be copied.TargetObject
A previously created object of the same class type.Options
For objects of ClassType clsDatabaseCommand, the CloneOptions argument has no effect and is ignored.
範例
The following example clones a command object:
'Assume a command object (dsoCmd) exists.
Dim dsoCmdCopy as new DSO.Command
dsoCmd.Clone dsoCmdCopy