Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a typical situation. I have certain delimited flat files having 10000 rows to be imported to SQL DB. So I built a package containing with For Each Loop containing:-

A. Script Task- which clears all the CLRF on in the Flat file(as per BUSINESS requirement).
B. Data Flow Task
C. File System Task.

Now when i run the package, if the flat files contains lesser rows say 50,60 the package runs okay for all the files. However as soon as I try with my actual files with 10,000 rows the package runs successfully for one file only. It shows "execution completed" after one file.

Again if i keep two smaller files(50-60 rows) and two bigger files (10000 rows) the package runs fine for all the files. Can any one help me out
Posted
Updated 28-Jan-14 2:20am
v2
Comments
Richard MacCutchan 28-Jan-14 8:23am    
You will need to show the offending code, and point out the part that is failing.

1 solution

Actually I don't know what happens. But you can find it by putting a break point. I can help in this point.

1- declare a variable for the processed line count:
C#
int lineC=0;


2- add if clause in the loop, and put the breakpoint here.
C#
while(<condition>) {
  if(lineC==9999) {
    Console.Writeline("i am here"); // <---- break point
  }
  lineC++;
}</condition>


then you can easily trace what happens.
 
Share this answer
 
Comments
bikash.8.9 29-Jan-14 9:11am    
I have used Break point to be hit at the start of the For each loop. In case of large file it is hit only once even if there are more than one file. However the package turn full green showing execution completed. In other case however the breakpoint is hit as many times as the number of files
Vedat Ozan Oner 29-Jan-14 12:06pm    
ok, then what happens after the last line? as I said, I just showed how to debug in your case. It is upto you to find what is happening in your code.

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