Hi friends,
I have an SSIS package, which consists of a Bulk Insert task. I was trying to pass the source file path as variable in Expression. Actually the source file is located in a server. The path is as follows,
“\servernameab” + @[user::file_name]
I have entered the above string as it is in the Expression page. The string validation is passed in the Expression. But, while executing the Bulk Insert task, it was displaying an error. The error was “The Bulk Insert task cannot find the mentioned path”. I have tried a lot of ways. No luck. Anyone please help.
Thank you.
Error while using the source path in the Expression editor.
Hi,
This is a general error facing by a lot of users. The Expression concept in the editor page is certainly a tricky page where we can do many things dynamically in SSIS for all the tasks. As per logic, the above path is correct. Even the Expression editor would pass the string validation.
According to the Expression, the first part would take as string whatever is given in double quotes. The next part will be taken as variable. But while executing, it should give error. If you want to pass a path as expression, then you have to use double backslashes “\” instead of single backslash ‘’.
Then your expression has to be changed as,
“\\servername\a\b\” + @[user::file_name]
For the server name, already there were two slashes, add two more for a valid server name.
Now, I am sure that you will get the right destination path. Try and enjoy coding.