Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem with ForEach Loop Container and Excel Connection Manager Expand / Collapse
Author
Message
Posted Friday, May 24, 2013 12:11 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 10, 2014 2:40 AM
Points: 41, Visits: 165
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
Post #1456301
Posted Friday, May 24, 2013 12:49 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 10, 2014 2:40 AM
Points: 41, Visits: 165
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.
Post #1456307
Posted Friday, May 24, 2013 1:24 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:55 AM
Points: 5,233, Visits: 9,463
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
Post #1456312
Posted Friday, May 24, 2013 1:36 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 10, 2014 2:40 AM
Points: 41, Visits: 165
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
Post #1456315
Posted Friday, May 24, 2013 2:09 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:55 AM
Points: 5,233, Visits: 9,463
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
Post #1456319
Posted Friday, May 24, 2013 5:24 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 10, 2014 2:40 AM
Points: 41, Visits: 165
the path is valid still no luck
Post #1456401
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse