Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 15th, 2004, 02:17 AM
Registered User
 
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vipulcs
Default Child package returning failure

hi,
I have created a package say "Parent" and from this package I am calling another package say "Child".
Now if my child package is failing due to some reason then I want to stop the processing of Parent package also.
As the parent package never come to know about the failure status of the child package, is there any way to stop processing of Parent.
May be Parent package can have two path from child package, one in case of success and another for failure.
I tried with this but it never follows the failure path.

Please help me out.
You can mail me to [email protected]
 
Old December 15th, 2004, 10:10 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

use and activex scripts for failure results or use the workfloe on failure to stop process


 '************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("<path to your file or server>")

If objFile.Size >0 Then
main = DTSTaskExecResult_success
else
main = DTSTaskExecResult_failure
end if
End Function


Jaime E. Maccou
 
Old January 3rd, 2005, 09:58 AM
Registered User
 
Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to greenash Send a message via Yahoo to greenash
Default

In parent package, right click child package task goto WorkFlow -> WorkFlow Properties -> Options tab uncheck all the check boxes from the "Execution" frame and try. Please recheck the Workflow precedence also.
 
Old January 7th, 2005, 12:49 AM
Registered User
 
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vipulcs
Default

Thanks a lot for this answer, i will try doing this.
Currently I have written two AST task. one in child package and on ein the parent package. I m writing flag status to the file from the child package, and reading it from parent package, thats it. this is a workaround.

 
Old January 7th, 2005, 02:16 AM
Registered User
 
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vipulcs
Default

I have tried doing WorkFlow -> WorkFlow Properties -> Options tab uncheck all the check boxes from the "Execution" frame, but still it wont follow the failure path.

 
Old January 7th, 2005, 02:41 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Did you try creating the activex scripts and adding it after your task

Code:
'**********************************************************************
'  Visual Basic ActiveX Script
'************************************************************************

Function Main()

if err.Number = 0 then 
Main = DTSTaskExecResult_Success 
else 
Main = DTSTaskExecResult_Failure 
end if 

End Function
Jaime E. Maccou
 
Old January 10th, 2005, 12:26 AM
Registered User
 
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vipulcs
Default

Yes. That is what I was doing,
if the task is failing set
Main = DTSTaskExecResult_Failure
otherwise Success.
But parent package always follow success path.





Similar Threads
Thread Thread Starter Forum Replies Last Post
HowtoRun package from .asp from Package Store? Tom de Koning BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 0 June 21st, 2006 08:08 AM
Opening MDI Child on Button Click of MDI Child Sachin Shinde Visual Studio 2005 0 June 8th, 2006 05:05 AM
install failure of deployment package Loralee Access 0 November 19th, 2005 12:29 AM
Another Login failure Bo.B.B BOOK: Beginning VB.NET Databases 6 July 10th, 2005 04:02 AM
don't run my package when i schedule package Isra2005 SQL Server DTS 1 May 17th, 2005 01:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.