Problem with ForEach Loop Container and Excel Connection Manager

  • Hi,

    I am trying to create a package that loops through several excel files to import data into a database. The problem I am experiencing is that as soon as I assign an expression variable for connection string in the Excel connection manager, I get the following error: Error 1 Validation error. [xyz]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "[XYZ]" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

    I'm using ssis 2012. I have set DelayValidation to true on both data flow task and excel connection manager.

    I have applied my variable to both ConnectionString and ExcelFilePath but this error persists:

    Please assist.

    Thanks 😀

  • please note that I have 2 Foreach containers. The Flat File (source) executes without any issues but the excel one gives the error. Both foreach loops are configured the same the only different is the one is flat file and the other one is excel.

  • OK, so that suggests to me that the problem is with the Excel connection, not with the ForEach container. What is your connection string, and have you tried using it outside the ForEach container?

    John

  • Yes, the problem is not with the ForEach loop, its with the excel connection manager. My excel connection manager ConnectionString is Provider=Microsoft.Jet.OLEDB.4.0;Data Source=;Extended Properties="Excel 8.0;HDR=YES"; and by the way i changed the Run64BitRuntime property to false with no luck

  • I'm really not an expert on this, but what jumps out at me is that there is no path to the file in your connection string.

    John

  • the path is valid still no luck

Viewing 6 posts - 1 through 5 (of 5 total)

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