Quantcast
Channel: Questions in topic: "ssis"
Viewing all articles
Browse latest Browse all 813

Custom SSIS component: SetDataTypeProperties not found

$
0
0
I'm a C# developer with limited experience in SSIS, but I've been asked to learn how to build custom components for the system. I've had some success building basic transformation components which take in an input and do something to the value (i.e. capitalising proper names and suchlike). But I've hit a problem trying to define custom output columns which I can't seem to get beyond. Here's some basic code - based on a sample from Microsoft - to add a boolean output: IDTSOutput100 output = ComponentMetaData.OutputCollection[0]; IDTSOutputColumn100 outputcol = output.OutputColumnCollection.New(); outputcol.Name = "IsValid"; outputcol.SetDataTypeProperties(DataType.DT_BOOL, 0, 0, 0, 0); In samples and tutorials I have seen code like this being called during `ProvideComponentProperties`, `Validate` and `OnInputPathAttached`. I guess it doesn't matter too much exactly where you add the column so long as it's triggered at design time, prior to execution. Wherever I put my code, when I try and use the component, I get this error: Error at Data Flow Task [MyClassName [26]]: System.MissingMethodException: Method not found: 'Void Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSOutputColumn100.SetDataTypeProperties(Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType, Int32, Int32, Int32, Int32)'. at EmailValidation.MyClassName.ProvideComponentProperties() at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProvideComponentProperties(IDTSManagedComponentWrapper100 wrapper) As you can see, I'm certainly calling `SetDataTypeProperties`. I've tried a number of variations on this code, including creating an output column for each input column (which seems to be a popular approach) all yielding versions of the same error. That error doesn't return any results when you search on it, except for questions I've already asked. I presume this may be some sort of environmental issue, but I have no idea what it is. I've tried adding Microsoft.SqlServer.DTSPipelineWrap.dll and the other relevant dll's to both the GAC and the SQL PipelineComponents folder on the machine where the package is running. Neither had any impact on the error. I'm developing the component in Visual Studio 2015 and my SQL installation is 2014 - the components are being deployed to the SQL/120 folder. I've got the Business Intelligence update installed to create Integration Services projects to test these components, and my test packages are also set to SQL Server 2014. **I have discovered this component works in Visual Studio 2013**. Does anyone have any idea what I'm doing wrong here?

Viewing all articles
Browse latest Browse all 813

Trending Articles