1

How to programmatically create script component of dataflow task in MS SQL Server 2008.

2 Answers 2

2

Below given link contains the Microsoft hands-on lab to create a custom transformation component in SSIS. The document pertains to SSIS 2005 but the logic should be applicable to SSIS 2008 as well.

SQL Server Integration Services (SSIS) Hands on Training - Creating Custom Components

Hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

1

This is the Code for creating a ScriptTask Programmatically.

Package pkg = new Package();
pkg.Executables.Add("STOCK:ScriptTask");
TaskHost th = (TaskHost)exec;
ScriptTask task = (ScriptTask)th.InnerObject;
task.ScriptProjectName = "YourProjectName.csproj”; // (or vbproj) 
th.Name = name;
task.ScriptLanguage = CS_SCRIPT;
task.ReadWriteVariables = “User::Var1,User::Var2”; //Comma separated list of variables  
task.ReadOnlyVariables = rvars;
task.ScriptingEngine.LoadScriptSolution(path);  // This method loads solution and builds 
task.ScriptingEngine.CloseIDE(true);            //  closes IDE and saves binary code 

1 Comment

Script Components and script tasks aren't the same thing and don't have the same properties and methods available to them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.