SQLTeam.com | Weblogs | Forums

SSIS Errors loading multiple files and sheets


#1

Hi,

I have a for each file container with a Foreach ADO.NET Schema Rowset Enumerator inside.
It reads each file (and each sheet within) and writes to a SQL table.

The files have the same structure just an additional sheet each month.

The package runs fine for the first two files then on the third it loads but can't carry out the file transfer task as it says the file is being used by another process.

I manually moved this file.

I then ran the package again for the last file and got the following message:
Error: The GetEnumerator method of the ForEach Enumerator has failed with error 0x80004005 "Unspecified error". This occurs when the ForEach Enumerator cannot enumerate.

Any ideas why this is happening? It runs fine for two files, the third it wont move and the 4th it says it cannot enumerate.

Thanks,

Q


#2

Have you tried:

Project properties > Configuration Properties > Debugging. Set the Run64BitRunTime to False.


#3

Hi,

Yes i have. The package runs for two files but won't file task move the third after it has read the data and can't enumerate for the 4th so reads in nothing.

Q


#4

YOu might want to try this: A script task to wait for a file to become readable. Here's one link:

http://microsoft-ssis.blogspot.ca/2010/12/continuously-watching-files-with-wmi.html

and another:

and another:

http://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/90571/

Personally, I've been using the C# code from the last example with success


#5

Thank you