Code

How to Localize Your Custom Connection Manager

How to Localize Your Custom Connection Manager

Similar to localizing a task, you can localize the display name and description of a custom connection manager by setting the LocalizationType property of the DtsConnection attribute. SSIS will look for two properties on the class: ConnectionDescription ConnectionDisplayName These must be public, static string properties on your LocalizationType class. The code looks like this:

Refresh an Excel Workbook with a Script Task

Refresh an Excel Workbook with a Script Task

Are you loading data from an Excel workbook with external queries using SSIS? Do you want to make sure those queries are refreshed before the load takes place? Have I got the post for you! I recently had to do this myself, and after some googling with Bing, I found an MSDN forum post that … Continued

Generate Data with a Script Component

Generate Data with a Script Component

I use the following code to generate data with a script component. I’ve found this useful in the past to demonstrate how buffers are handled in the data flow, as well as perf/load testing a destination component. This script will automatically generate data based on the columns you’ve defined for the component – no additional … Continued

Encrypting Sensitive Properties in a Custom Connection Manager

SSIS provides a mechanism to automatically encrypt the sensitive properties of your Connection Manager (or Task) based on the package ProtectionLevel. To make use of this in your custom code, you’ll need to do two things: Implement the IDTSComponentPersist interface Add a Sensitive=”1” attribute to one or more elements of your persisted Connection Manager (or … Continued

How to Localize Your Custom Task

How to Localize Your Custom Task

The DtsTask attribute has a LocalizationType member. This should be your resource class. SSIS will look for two properties: TaskDisplayName TaskDescription These must be public, static string properties on your “LocalizationType” class. Your task code would look like this:

You can add localizable string resources to your class from the Project settings: Note, the … Continued

Automatically Select Input Columns in a Custom Data Flow Component

Automatically Select Input Columns in a Custom Data Flow Component

The following code snippet can be used in a custom data flow component to automatically select all input columns when you attach a path.

This is the equivalent to clicking the Select All box in the Advanced Editor.