Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
allan8964
Posting Yak Master
249 Posts |
Posted - 2011-12-28 : 13:16:21
|
Hi there,I embed a batch file in Execute process task. The file works to read a text file. I program that if the text file is not found then give a message and write to event viewer logs. It works in DOS but not ok in SSIS. In Execute Process task, it always succeeds. I think I need set some properties there to make SSIS recognize the error. Any idea? Thanks. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-29 : 00:32:07
|
why should you do this in bat? you can do it inside SSIS script task itself------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
allan8964
Posting Yak Master
249 Posts |
Posted - 2011-12-29 : 09:57:26
|
Thanks visakh16.The reason I use Execute process task is that I have already created console app. and it originally works outside the sql. The function of that file is to scan a text file and get rid of some signs in that etxt file and gives error msg if the file to be scanned is absent. Now when I use it in Execute process task, it does not give error msg even it can't find the file to scan. I can try to use Script task. But I have two questions:1. Can I use origianl c# console code in script task editor?2. Still, how can I pass out the error msg? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-01 : 02:31:59
|
1. you cant use it directly. for that execute process task is good2.you can use onerror event handler for that------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|