Creating SSIS Package from .net C#, receiving "HRESULT: 0xC0202009" RRS feed

  • Frage

  • Good morning,

    first i'd like to excuse for my "rusty" english.

    This my first post in the msdn forums an i hope i get some help from ppl more concerned to this topic than myself ;)

    The problem i'm faceing ist that i work for a company besides studies(so beginner level ;) ) where the ppl use a self-developed "SSIS Package Generator" to get Tables from ERP System etc. into the Import Layer of our DWH. The data comes from both, informix and sql sever.

    My task is now to add another informix source to the "tool", to import the table schemas from a productive management tool, used by a department.

    The workflow of the tool requests information like, source table and destination table (schema and name) and uses liked server to get the data from informix server. In the end the tool creates a simple ssis package containing a T-SQL Truncate and a Data Flow Task with OLE DB Source and Destination.

    The Point is that i'm receiving a HRESULT: 0xC0202009 in the OLE DB Source.

                   /////////////////////////// OLE DB Source ///////////////////////////
                    // Create and configure an OLE DB source component.  
                    IDTSComponentMetaData100 ImportSrce = DataFlowMainPipe.ComponentMetaDataCollection.New();
                    ImportSrce.ComponentClassID = "DTSAdapter.OLEDBSource";
                    // Create the design-time instance of the source.
                    CManagedComponentWrapper ImportSrceInstance = ImportSrce.Instantiate();
                    // The ProvideComponentProperties method creates a default output.
                    ImportSrce.Name = importsrcename;
                    // Assign the connection manager.
                    ImportSrce.RuntimeConnectionCollection[0].ConnectionManagerID = SourceConn.ID;
                    ImportSrce.RuntimeConnectionCollection[0].ConnectionManager = DtsConvert.GetExtendedInterface(SourceConn);
                    // Set the custom properties of the source.
                    ImportSrceInstance.SetComponentProperty("AccessMode", 3); // Mode 3 = SQL Command from Variable
                    ImportSrceInstance.SetComponentProperty("SqlCommandVariable", "User::sSrceSqlCommand");
                    // Connect to the data source, and then update the metadata for the source.
                    ImportSrceInstance.ReinitializeMetaData(); // LINE WHERE I GET HRESULT: 0xC0202009

    I already "googled" the error but there aren't any usefull solutions or helpful tips. Many of the hits i get, refer to a 32/64-Bit Problem while executing ssis packages, which im familar with and know how to get rid off. But i dont know why its not even possible to create the package out of the generator.

    Hope anyone can help me! If you need additional information, just ask!

    Best regards

    PS: Sehe ich das Richtig, dass das hier "nur " die deutsche Sektion ist? ^^ Dann änder ich das ganze sonst mal ab ;)

    • Bearbeitet luseocx Montag, 11. Februar 2013 09:53
    Montag, 11. Februar 2013 09:32