Clone (Command Interface)
Note
This feature will be removed in the next version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible.
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
Syntax
object.Clone(ByVal TargetObject As Command, [ByVal Options As CloneOptions = cloneMajorChildren])
Parameters
- 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.
Example
The following example clones a command object:
'Assume a command object (dsoCmd) exists.
Dim dsoCmdCopy as new DSO.Command
dsoCmd.Clone dsoCmdCopy