OutputGlobalVariableNames Property

DTS Programming

DTS Programming

OutputGlobalVariableNames Property

The OutputGlobalVariableNames property returns or specifies a list of Data Transformation Services (DTS) global variable names that are to receive values from fields of a rowset or the entire rowset. The values and rowsets are generated by the Execute SQL task query.

Applies To
ExecuteSQLTask2 Object
Syntax

object.OutputGlobalVariableNames [= list]

Part Description
object Expression that evaluates to an ExecuteSQLTask2 object
list List of global variable names

Data Type

String

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetOutputGlobalVariableNames(BSTR *pRetVal);

HRESULT SetOutputGlobalVariableNames(BSTR NewValue);

Remarks

The format of the OutputGlobalVariableNames string is a semicolon delimited, optionally double-quoted or single-quoted list. Quoting is required only when the name contains an embedded delimiter. Embedded delimiters must be doubled. A double-delimiter or a trailing delimiter indicates an empty item. For example:

   "gv1";gv2       - delimiters not required here
   gv1;"gv""2"     - gv"2 embedded delimiter is doubled
   gv1;;gv2;       - contains an empty second and fourth item

Values from the first row of the rowset are placed into the global variables in the list by ordinal position. Empty items in the list cause rowset columns to be skipped. If the global variable does not already exist, one is created unless the DTS package ExplicitGlobalVariables property is set. In this case, an error occurs.

If the OutputAsRecordset property is set, the entire rowset is placed in the first named global variable as a disconnected Microsoft® ActiveX® Data Objects (ADO) recordset. The variable is set to Nothing if no rowset is returned from the query.

See Also

GlobalVariables Collection

InputGlobalVariableNames Property

OutputAsRecordset Property

SQLStatement Property