DataDrivenQueryTask Object

DTS Programming

DTS Programming

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
DeleteQuery Property InsertQueryColumns Property
DeleteQueryColumns Property LastRow Property
Description Property MaximumErrorCount Property
DestinationColumnDefinitions Property Name Property
DestinationCommandProperties Property ProgressRowCount Property
DestinationConnectionID Property SourceCommandProperties Property
DestinationObjectName Property SourceConnectionID Property
DestinationSQLStatement Property SourceObjectName Property
ExceptionFileColumnDelimiter Property SourceSQLStatement Property
ExceptionFileName Property UpdateQuery Property
ExceptionFileRowDelimiter Property UpdateQueryColumns Property
FetchBufferSize Property UserQuery Property
FirstRow Property UserQueryColumns Property
InsertQuery Property  

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.

See Also

DTSTransformStatus