DataDrivenQueryTask Object
The DataDrivenQueryTask object reads data through a source Connection object and transforms it using one or more Transformation objects. One of the transformations, a DataPumpTransformScript object, returns an indicator that determines which of four parameterized queries is executed on the destination Connection object. For more information, see Adding DTS Transformations and Adding DTS Column Objects.

The queries are called the Insert query, Update query, Delete query and User query, although they do not actually need to be used for these purposes. Any sequence of SQL action statements and stored procedure calls can be used for any of the queries. The query parameters are columns from the destination connection. For more information, see Adding DTS Query Strings.
Collections
Lookups Collection | Transformations Collection |
Properties Collection |
Properties
Methods
Execute Method |
Remarks
The query selection indicator must be from the DTSTransformStatus constants. Do not use a sum or logical OR of these values. If more than one DataPumpTransformScript object returns an indicator, all but the last will be overwritten and lost.
The DataDrivenQueryTask object is compatible with Microsoft® SQL Server™ version 7.0. For information about an extended version of this object, see DataDrivenQueryTask2 Object.
For more information about how to create a DataDrivenQueryTask object and assign query strings and parameters, see DTS Query Strings in Visual Basic.