The SQLStatement property specifies a sequence of one or more SQL statements or stored procedure references to be executed.
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 |
String
Read/write
HRESULT GetSQLStatement(BSTR *pRetVal);
HRESULT SetSQLStatement(BSTR NewValue);
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.