How to Dynamically Create Variables in Script Task. Urgent Please!!
I am using
Dts.Variables.Add("myVar1", true, "User", 5);
method but its giving error like this:
Exception from HRESULT: 0xC0016026 ---> System.Runtime.InteropServices.COMException (0xC0016026): Exception from HRESULT: 0xC0016026at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables100.Add(String bstrName, Boolean bReadOnly, String bstrNamespace, Object vValue)
at Microsoft.SqlServer.Dts.Runtime.Variables.Add(String name, Boolean readOnly, String nameSpace, Object val)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Dts.Runtime.Variables.Add(String name, Boolean readOnly, String nameSpace, Object val)
at ST_3de12d4b97354b57bf8c88a45589084f.csproj.ScriptMain.Main()
--- End of inner exception stack trace ---
avm