Hi, I am using vs 2017 ssdt and would like to assign result of a method to a variable in script task using C#. I am trying to do this outside of main method. I can read the SSIS variable values in the main method but not being able to access it outside of
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase { public void Main() { //Do something } private class DiffClass { private Microsoft.SqlServer.Dts.Runtime.Variables DtsVariables; public string MakeURL() { return DtsVariables["User::URLBase"].Value.ToString() + "/default.aspx"; // how to assign this value to the below variable } string urlbase = MakeURL(); //Return results of MakeURL() to the string urlbase
} }
Thank you.
SQLEnthusiast