I have DFT, where I extracting a URL from a table and I need to store that value into a variable.
I am using OLEDB Source to connect to My SQL Server and selecting the required columns. Then I have Conditional Split which will split the right URL for me. The right URL flow from a conditional split I have mapped to Script Component.
Below is the C# code I have used:
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
this.ReadWriteVariables["User::NextPageLink"].Value = Row.href;
}
But when I try to execute I am getting a below error:
[Script Component [116]] Error: Microsoft.SqlServer.Dts.Pipeline.ReadWriteVariablesNotAvailableException: The collection of variables locked for read and write access is not available outside of PostExecute. at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)