Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have done like in this example:
<a href="https://www.sentryone.com/blog/how-to-loop-through-files-in-a-specified-folder-load-one-by-one-and-move-to-archive-folder-using-ssis">How to loop through files in a specified folder, load one by one, and move to archive folder using SSIS</a>[<a href="https://www.sentryone.com/blog/how-to-loop-through-files-in-a-specified-folder-load-one-by-one-and-move-to-archive-folder-using-ssis" target="_blank" title="New Window">^</a>]


This is the connectionstring  för the Excel connection manager:
<pre>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\test\lifecareinneliggandeIN\filA.xlsx;Extended Properties="Excel 12.0 XML;HDR=YES";


And this code I have vritten in Expressions under ConnectionString:
@[User::varFilePath]



Everything works fine, when I write the connection to a specific file. But as soon as I change the connection to the variable ;
@[User::varFilePath]
, then I get the error message that I need to specify filename.

I have tested to "Delay validation", booth True and False, but it doesn't work.

What I have tried:

I eventually found a solution for the error.

The problem was that I never could get rid of the red errormessage.
But the error disappeared when I tried to run it anyway.
I supposed that is an effect from "Delayed validation".

When the package was run, the error was gone.
Posted
Updated 26-Apr-21 1:55am
v3
Comments
RedDk 23-Apr-21 12:29pm    
What is the connection string you are using right now? If you think this information is sensitive use standard substitutions for the bits most likely so. Without seeing the thing which is causing that error, there's no way for anyone here at cp to judge what's wrong.
Skrollum 24-Apr-21 5:26am    
Is there a way to add my solution here?
Skrollum 24-Apr-21 5:29am    
I would happily put my project here but I dont know how to.
RedDk 24-Apr-21 17:57pm    
Sure. You can hit the "Improve Question" widget and the Question as it is currently typed will appear in editable form in the edit box (again). By enclosing in [Edit] brackets [/Edit] such things as a connection string, for instance, you can make what looks like added value to your original. Exiting the edit will refresh the Question.
Skrollum 25-Apr-21 12:17pm    
Now I have specified it more. But it would be nice if I could add the totalsolution somewhere.

1 solution

I have done like in this example:
How to loop through files in a specified folder, load one by one, and move to archive folder using SSIS[^]


This is the connectionstring för the Excel connection manager:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\test\lifecareinneliggandeIN\filA.xlsx;Extended Properties="Excel 12.0 XML;HDR=YES";


And this code I have vritten in Expressions under ConnectionString:
@[User::varFilePath]



Everything works fine, when I write the connection to a specific file. But as soon as I change the connection to the variable ;
@[User::varFilePath]
, then I get the error message that I need to specify filename.

I have tested to "Delay validation", booth True and False, but it doesn't work.
 
Share this answer
 
Comments
Richard Deeming 26-Apr-21 5:37am    
If you want to update your question to add more information, click the green "Improve question" link and update your question.

Do not post your update as a "solution" to your question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900