Using a Script Task to Create a ADO.NET (ODBC) Data Flow Source

  • Well right after posting this question, I managed to figure it out.

    I changed this:

    Dim cmSource As ConnectionManager = package.Connections.Add("Odbc")

    to this:

    Dim cmSource As ConnectionManager = package.Connections.Add("ADO.NET:System.Data.Odbc.OdbcConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")

    And this

    srcDesignTime.SetComponentProperty("AccessMode", "SQL Command")

    srcDesignTime.SetComponentProperty("SqlCommand", "SELECT * FROM [dbo].[TestTable]")

    to this:

    srcDesignTime.SetComponentProperty("AccessMode", 0)

    srcDesignTime.SetComponentProperty("TableOrViewName", """dbo"".""TestTable""")

  • This link might be helpful too...

    http://bifuture.blogspot.com/2011/01/ssis-adding-derived-column-to-ssis.html

  • ...and if you're using OleDB connection managers, the EzAPI code seems to work to create SSIS packages as well.

    Here's the latest source on CodePlex:

    http://sqlsrvintegrationsrv.codeplex.com/SourceControl/list/changesets

    The problem I had with the 2008 codebase for EzAPI is that the class that could create ADO.net connections is implemented as a virtual class, so you'd basically need to roll your own from that class...

Viewing 3 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply