How do I change the datatype of a variable of DTS.variable class?I am getting it as Int32 by default.Variable MaxPrimaryKey = pkg.Variables.Add("MaxPrimaryKey", false, "User", 0);
Currently, the MaxPrimaryKey variable is Int32.But the schema had to be recently changed to BIGINT.So, I require the variable to be of type Int64.I couldn't find much info in the net on how to convert type of such a variable in .NET code.I have around 300 SSIS packages which were developed using our own custom built application that built the packages using Dts classes in .Net and loading tasks with xml tags.I also took out the Dtsvariable tag from the dtsx file so created in xml format. Can I just load the same into the package object with a modified type to get it done? If so, where will I generate the DTSID value from, which seems to be auto-generated?Here is that snippet:<DTS:Variable><DTS:Property DTS:Name="Expression"></DTS:Property><DTS:Property DTS:Name="EvaluateAsExpression">0</DTS:Property><DTS:Property DTS:Name="Namespace">User</DTS:Property><DTS:Property DTS:Name="ReadOnly">0</DTS:Property><DTS:Property DTS:Name="RaiseChangedEvent">0</DTS:Property><DTS:VariableValue DTS:DataType="3">0</DTS:VariableValue><DTS:Property DTS:Name="ObjectName">MaxPrimaryKey</DTS:Property><DTS:Property DTS:Name="DTSID">{EBD37D38-7880-4740-8064-1A36A9F81027}</DTS:Property><DTS:Property DTS:Name="Description"></DTS:Property><DTS:Property DTS:Name="CreationName"></DTS:Property></DTS:Variable>
Please help me out on this.