I have a SSIS Package , which runs fine in Visual studio. The package uses a for each file loop and the variable points to a folder like this:
\\server\d$\foldername\subfolder\
When I deploy the package on SSMS, when I execute the package I get the following error:
Error 1: FLC - for each sub folder: Error: The GetEnumerator method of the ForEach enumerator has failed with error 0x80131509 "null" . This occurs when the for each enumerator cannot enumerate
Error 2: FLC - For each sub folder: Error The object in the variable "User: ProductFolderList" does not contain an enumerator.
Below is the code used:
string folder = Dts.Variables["User::varProcessingFolderLocation"].Value.ToString();
Dts.Variables["User::ProductFolderList"].Value = System.IO.Directory.GetDirectories(folder);
Dts.TaskResult = (int)ScriptResults.Success;
SSMS version is 2017, visual studio solution is built in 2016 and project configuration is VNext. I have verified the permissions of the folder and the ID with which I am running it has full control. How to fix this? Thanks
[Code with Message box]
string folder = Dts.Variables["User::varProcessingFolderLocation"].Value.ToString();
MessageBox.Show(folder);
Dts.Variables["User::ProductFolderList"].Value = System.IO.Directory.GetDirectories(folder);
MessageBox.Show(Dts.Variables["User::ProductFolderList"].Value.ToString())
User contributions licensed under CC BY-SA 3.0