1

I hope I've added this to the right part of the forum - it's about SQL Server Visual Studio 2017 using a Script Component with a source table I've created and want to bring into the Project.

So, I have a SQL Server SSIS Project built in Visual Studio 2017 on Windows 8 o/s. I have connected an .xls file to the Script component (SC) and now want to add the script that I need to add to the below that will allow me to see the output in the destination file.

The fields in my table are CustID, Person_ID, StoreID.

I've created the Output files in the Input/Output part of the SC as well as the Connection manager.

Next I want to add the relevant code to see the output from the table - NOTE the output should be exactly the same as the source table.

I've found that I need to add script to the Script after the AddRows() line

And then I would add the below;

MyOutputBuffer.AddRow();
//Below is where I'm stuck...
MyOutputBuffer.CustID = //"What should I add here to get the result from my table??"

Can anyone help? Thanks

Hadi
  • 36,233
  • 13
  • 65
  • 124
  • Based on my understanding, you're extract data from xls to falt file, so no need to use Script component, just mapping them with Data flow. – BeiBei ZHU Jul 08 '19 at 02:02

1 Answers1

0

To access the Inputs columns you have to use Row.<Column name> to read the column value. As example:

MyOutputBuffer.CustID = Row.CustID;

For more information you can refer to the following documentation:

Hadi
  • 36,233
  • 13
  • 65
  • 124