New (Datarow) Method

Creates a new variable (Datarow).

Syntax

Sub New(name, type, value, description, sourceTable, varDefType)


Parameters


name

Type: String

The name of the variable


type

Type: VSVariableDataType

The name of the variable


value

Type: Object

The name of the variable


description

Type: String

The name of the variable


sourceTable

Type: String

The name of the source table where the datarow is bound to


varDefType

Type: VSVariableDefinitionType

The name of the variable



Return Value


Type: VSVariable

Examples

IronPython

#Create Datarow variable

var = VSVariable(varName, VSVariableDataType.Datarow, varName + " (set by IronPython script)", varName + " (set by IronPython script)", "Transactions", VSVariableDefinitionType.VSDynamic)
Host.ScriptData.Variable[varName] = var


C#

//Create Datarow variable

VSVariable var = new VSVariable(varName, VSVariableDataType.Datarow, varName + " (set by C# script)", varName + " (set by C# script)", "Transactions", VSVariableDefinitionType.VSDynamic);
ScriptData.set_Variable(varName, var);

Remarks