SQLStatement Property

DTS Programming

DTS Programming

SQLStatement Property

The SQLStatement property specifies a sequence of one or more SQL statements or stored procedure references to be executed.

Applies To
ExecuteSQLTask Object ExecuteSQLTask2 Object
Syntax

object.SQLStatement [= value]

Part Description
object Expression that evaluates to an object in the Applies To list
value Query that is a sequence of one or more SQL statements or stored procedure references

Data Type

String

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetSQLStatement(BSTR *pRetVal);

HRESULT SetSQLStatement(BSTR NewValue);

Remarks

In the ExecuteSQLTask2 object, the SQLStatement query can contain ? tokens that are replaced by the values of global variables specified by the InputGlobalVariableNames property. Fields from the first row of the rowset generated by the query are assigned to the global variables specified by the OutputGlobalVariableNames property. The entire rowset can be written to a global variable as a disconnected Microsoft® ActiveX® Data Objects (ADO) recordset if the OutputAsRecordset property is set.

See Also

InputGlobalVariableNames Property

OutputAsRecordset Property

OutputGlobalVariableNames Property