Link to home
Start Free TrialLog in
Avatar of MrDeveloper
MrDeveloper

asked on

Beginner DTS package question

Hello, I'm building my first DTS package with workflows, etc.  

Process steps:

1)  connect to an ftp site, dump a file into a folder on the server
2)  send email task "file not there" kind of thing
3)  A transform data task between two connections - the 1st is the text file and the second is a table in a SQL Server database

I put an "on success" workflow from #1 to #3 and an "on failure" from #1 to #2.  My reasoning was that if the file was not there, #1 should fail and fire off the email.  To my surprise, when it ran I got: "1 task(s) failed during execution."  Oddly enough, #1 was successful and then #3 between the two visual connection objects failed (of course...  the file is not there).  

Could someone point out what I'm doing wrong?  
Avatar of apirnia
apirnia
Flag of United States of America image

What kind of error you get when you run the DTS
Avatar of Jay Toops
Easy just connect task #3 to task #2 on failure.
disconnect the #1 on failure to #2 link.
and add annother step to delte the file after you are done transforming it.

Jay
its not uncommon for ftp to dl a Zero Length file..

Ive had this happen a LOT when dealing with some types of ftp servers.

Jay
Avatar of MrDeveloper
MrDeveloper

ASKER

Hey Jay, thanks for the quick reply!  I can't seem to figure out how to connect the failure of the data transformation between the two connections to the send mail task.  

let me describe how it looks in the designer...  I have the icon representing my ftp task of course.  A green arrow (success) flows to the first connection icon, which is to a file.  Below it sits a second connection icon, representing the sql server table.  Between the two connections is a data transformation workflow task (an arrow).  

If I try to select the data transformation arrow and then the send mail task and connect them with a failure workflow, I get a msg, "Fewer than two items have been selected"

Currently I have a failure workflow arrow connecting the ftp task icon to the send mail task icon.

Does this help?  I'm probably missing something obvious.  Thanks so much
Hey apirnia, I get a failure on the copy data task (I believe that it is the transform data task arrow going from my text file connection icon to my sql server table connection icon
ASKER CERTIFIED SOLUTION
Avatar of Jay Toops
Jay Toops
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are you trying to copy data from Text to SQL table??
If so this might be where you are getting your errors if your fields in your table are other than Varchar.

Hey apirnia, that step actually works perfectly.  In the event that the file exists on the ftp site, then everything works fine and it fires off a successfully email to me.  The part that I can't get working is when the file does not exist there, I want to branch off to a failure email event.

Thanks!
did you try my steps  yet ??

JAY
Wow jltoops , worked perfectly!  Thanks so much...  So, in general I guess, on a transform data step that involve 2 steps, put success/failure events on the second connection.  Thanks so much
NP ...
glad ur getting it..

Jay