Microsoft Visual Studio 2008 (version 9)
I created a SSIS package were I import a .xls file to load into SQL database.
So I created a connection with the following properties:
(connectionString : Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\fld6Filer\BRDProduction_SurveyFiles$\Incoming\TestingSurveyFiles\MyleneTestingFiles\CriticalList\CriticalList.xls;Extended
Properties="EXCEL 8.0;HDR=YES";)
![]()
So far so good, everything is working as planned!
However, I want to make that connection dynamic by reading the value from a sql table and assigning to to the ConnectionString. So I added the following lines of code in a script
task:
String InputFileName = Dts.Variables["FileName"].Value.ToString();
Dts.Connections["CriticalListExcelFile"].ConnectionString ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ InputFileName +";Extended Properties=\""+"EXCEL 08.0;HDR=YES"+ "\""+ ";";
The value is being passed without any problem. But when I get to the part in the data flow where I actually import the file…
![]()
I get the following errors:
[Source - Excel File [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "CriticalListExcelFile"
failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
[SSIS.Pipeline] Error: component "Source - Excel File" (1) failed validation and returned error code 0xC020801C.
[SSIS.Pipeline] Error: One or more component failed validation.
Error: There were errors during task validation.
Please note that I do have the DelayValidation set to True.
Can somebody help me with that? I did found some tips on the web like changing theRun64BitRuntime to False under the debug options… but I can’t find where to go!!
Help!!!
Mylene Chalut