17.07.2015 Views

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6: <strong>FILESTREAM</strong> with SSIS and SSRSSet the Index column to 0 to tell the Foreach Loop container to store the value from thefirst column <strong>of</strong> the result set in the itemID variable on each iteration. Click OK to savethe configuration, and return to the Package Designer.Adding a Script task to perform <strong>FILESTREAM</strong> operations<strong>The</strong> next step is to add a Script task to the package, which we will use to write the .NETcode to perform <strong>FILESTREAM</strong> operations using the <strong>FILESTREAM</strong> Managed API. You canfind the Script task in the toolbox under Control Flow Items. Drag and drop it onto thePackage Designer window, inside the Foreach Loop container (Figure 6-18).Figure 6-18:Adding the Script Task inside the Foreach Loop container.Next, we will write some .NET code to perform the <strong>FILESTREAM</strong> operations. Dependingupon your preference, you can choose C# or VB, but note that this decision must be madebefore you make any changes to the script task; once the script task has been modified,you cannot change the .NET language associated with it.247

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!