dbTalk Databases Forums  

SSIS ForEach FileEnumerator

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS ForEach FileEnumerator in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dominik
 
Posts: n/a

Default SSIS ForEach FileEnumerator - 05-13-2009 , 04:59 AM






Hello!

I've got a problem with a ForEach FileEnumerator in SSIS/SQL2005. To import
some CSV-files I do a loop in a specified directory. Everythings works fine.
But at least I want to move the imported file in another directory. To do
this I'm using a FileSystem-Task. I've set the property
"IsSourcePathVariable" to TRUE and defined a new user variable called
"varFileName" in which each filename should be commited to the
FileSystem-Task.

But the SSIS designer shows the error message, that the variable is empty
and so I am not able to start debugging. To verify that the variable is not
empty, I added a script to the ForEachLoop in which the contents of the
variable are shown in a MsgBox ==> Everything is fine. But the SSIS Designer
still shows the same error message (SOURCE Variable is empty).

Reply With Quote
  #2  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS ForEach FileEnumerator - 05-13-2009 , 06:53 AM






I have noticed that when working with text files, that you need to 'seed' the
contents of the variable with some valid file name (and location, etc)
inorder for the designer to interpret things correctly.

When it runs, the variable will get assigned a new value each time through
the loop and may not even use the initial value at all, but it still needs to
be there to validate.

HTH
=====
Todd C


"Dominik" wrote:

Quote:
Hello!

I've got a problem with a ForEach FileEnumerator in SSIS/SQL2005. To import
some CSV-files I do a loop in a specified directory. Everythings works fine.
But at least I want to move the imported file in another directory. To do
this I'm using a FileSystem-Task. I've set the property
"IsSourcePathVariable" to TRUE and defined a new user variable called
"varFileName" in which each filename should be commited to the
FileSystem-Task.

But the SSIS designer shows the error message, that the variable is empty
and so I am not able to start debugging. To verify that the variable is not
empty, I added a script to the ForEachLoop in which the contents of the
variable are shown in a MsgBox ==> Everything is fine. But the SSIS Designer
still shows the same error message (SOURCE Variable is empty).

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.