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

请参阅

参考