June 9, 2008 at 12:40 pm
Hi All ,
Please suggest me to how to call a C# assembly from an SSIS?
Basically I am trying to extract very nasty file. Before I changed it to any other format , i must run that file to out C# program to change it to pipe delimited. Then I need to load that file in our SQL server. ( all this proces must be done in SSIS)
Thanks
June 9, 2008 at 12:56 pm
You can call another assembly through script tasks. A script task can be a task in the control flow, or a source, transformation, or destination in the data flow of a package.
After you have determined the type of task you want and dragged a script task into it, oen the VBA editor and add a reference to your .dll to be able to access it.
June 9, 2008 at 1:23 pm
Michael,
Thanks for reply .
Do you have a sample code to call C# in script component?
It would be great help.
Thanks
June 9, 2008 at 1:29 pm
It's all based on the object model of the code you are calling. You reference it just like you would if you were writing an application in C#. If you have access to the developer that wrote the assembly, drop in a script component, open the script designer (which will open in visual studio) and call over the developer that wrote the assembly to help you configure the reference. In the project it is pretty much just right-click on the references node in the explorer and choose add reference.
You need to know about some issues. The assembly needs to be placed in the .Net framework folder on your machine and then registered in the GAC. Adding it to the GAC is what will make it appear in the selection list. You will also want to do this on the server that will run the package (if you use the job agent, the server that the agent is running on). Your C# developer should understand that also.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply