Sunday, March 25, 2012

Conversion of DTS Application to SSIS Application - SourceConnectionId and SourceObjectName

Hello All,

I am trying to convert an application created using DTS classes to SSIS object model. I have found following code in the application.

For x As Integer = 1 To mTask.Properties.Count

If mTask.Properties.Item(x).Name = "SourceConnectionID" Then

CnID = mTask.Properties.Item(x).Value

Exit For

End If

Next

For x As Integer = 1 To mPkg.DTSPackage.Connections.Count

If mPkg.DTSPackage.Connections.Item(x).ID = CnID Then

Return mPkg.DTSPackage.Connections.Item(x).Name

End If

Next

Return mTask.Properties.Item("SourceObjectName").Value

How can I retrieve or Set "SourceConnectinId", "SourceObjectName" of a data flow task in SSIS

Please help me to solve this problem.

Thanks in advance

Subin

Hello All,

How can I retrieve source and destination connection information of a data flow task through code (c#) . My dataflow task have one flat file source, script task and oledb destination. In SQL Server 2000 DTS, there is a SourceConnectionId property to get connection information. Which SSIS property is equivalent to SourceConnectionId of DTS?.

Please help me

Thanks in advance

Subin

|||Subin,
I've merged these two posts from you as they are the same topic. Please don't start a new thread for the same topic you've already posted about.

Thanks,
Phil Brammer|||

Subin wrote:

Hello All,

How can I retrieve source and destination connection information of a data flow task through code (c#) . My dataflow task have one flat file source, script task and oledb destination. In SQL Server 2000 DTS, there is a SourceConnectionId property to get connection information. Which SSIS property is equivalent to SourceConnectionId of DTS?.

Please help me

Thanks in advance

Subin

There is no apples-to-apples equivalent. DTS and SSIS have very different object models.

You will have to iterate over the SSIS object model exactly as you did in DTS. This post should help:

Building Packages Programatically

http://blogs.conchango.com/jamiethomson/archive/2007/03/28/SSIS_3A00_-Building-Packages-Programatically.aspx

As Phil says - there is no need to post a thread more than once unless it has gone unanswered and therefore hidden many pages back.

-Jamie

|||Components reference connections through the RuntimeConnectionCollection collection, a property of the IDTSComponentMetaData90 class.

No comments:

Post a Comment