I've got an SSIS package with a foreach loop. The foreach loops and reads files. Filenames are put in a Variable User::FileName (index 0).
My Data Flow Task is just an XML source and Ole DB Destination.
The User::Filename is passed to the XML source via "XML file from variable"
I'm using the inline schema, which is valid (afaiks).
When running the package, I get this error:
[XML Source [50]] Error: System.Collections.Generic.KeyNotFoundException: De gegeven sleutel is niet aanwezig in het woordenboek. bij System.Collections.Generic.Dictionary`2.get_Item(TKey key) bij Microsoft.SqlServer.Dts.Pipeline.DtsDataTableCollection.AssociateTablesWithBuffers(IDTSOutputCollection100 outputs, IDTSBufferManager100 bufferManager, Int32 localeID, DataSet dataSet) bij Microsoft.SqlServer.Dts.Pipeline.DtsDataTableCollection..ctor(XmlSourceAdapter xmlSourceAdapter, IDTSOutputCollection100 outputs, Int32 localeID, DataSet dataSet, IDTSBufferManager100 bufferManager) bij Microsoft.SqlServer.Dts.Pipeline.XmlSourceAdapter.PreExecute() bij Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper100 wrapper)
There is no TKey in my file.
When I run this package with an xsd, no error is generated, but no rows are being read.
When remove the foreach container and just point to a file with "inline schema" all rows are read and no error generated. However, I don't want to make a Data Flow for each file...
I am at a loss. Could anybody help me with a solution? A way to debug this error? A general direction to search?
Visual Studio 2010.