Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Flat File ConnectionString is not reading variable

$
0
0

Ug. i've doen this a dozen times and now it fails.

My Parent package has a variable "NRC_Picker_ClinicalFileDestination" I read the parent variable into a child package variable "ClinicalFileDestination" and in my child package I have a script to create a file name:

//Build the filename
            if ((bool)Dts.Variables["ClinicalCreateTestFile"].Value == false)
            {
                Dts.Variables["ClinicalFileName"].Value = "1234_DAT_CHN_" + dtStartDate.ToString("MMddyyyy") + "_" + dtEndDate.ToString("MMddyyyy") + ".txt";
            }
            else
            {
                Dts.Variables["ClinicalFileName"].Value = "TEST_1234_DAT_CHN_" + dtStartDate.ToString("MMddyyyy") + "_" + dtEndDate.ToString("MMddyyyy") + ".txt";
            }

Then in my flat file connection manager I append the file name to the path.

expressions-connectionString = @[User::ClinicalFileDestination] +  @[User::ClinicalFileName]

But the data flow task now fails and is not building the full path to the file. The execution results just shows the path

"[ffDest_Clinical [270]] Information: The processing of file \\che\is\AppData\DataExtracts\NRC_Picker\

Any ideas. i've rebooted the pc and changed the delay validation to True on the connection manager, but still no filename appended. My next step is to create a variable for the full path, load it in the script, and use it in the connection manager, which I have never had to do before and see if that works.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>