Friday, March 9, 2012

Programmatically creating Source Script Component

Does anyone know how to create a Source Script Component programmatically. I can only seem to create a Transformation Script Component. I have this:

PipeLineWrapper.IDTSComponentMetaData90 sourceComponent =
((dataflowTask as TaskHost).InnerObject as PipeLineWrapper.MainPipe).ComponentMetaDataCollection.New();

sourceComponent.ComponentClassID = app.PipelineComponentInfos["Script Component"].CreationName;

Is there anything I have to do extra to make it a source script component, seeing how it defaults to a transformation.

Try deleting all inputs. That should make it a source.

Thanks,

Bob

No comments:

Post a Comment