dbTalk Databases Forums  

DTS Stop failures

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


Discuss DTS Stop failures in the microsoft.public.sqlserver.dts forum.



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

Default DTS Stop failures - 08-12-2004 , 05:25 AM






Hi,

Could someone please help.

I have a package that does an export to file based on SQL syntax, if
there are no rows to export from the SQL syntax then I populate a GV
with 0, after this step I have a piece of activex script to check this
variable if it is 0 then stop the package and do not run any other
task. The problem is that this causes a failure to flag (although
technically it is not failure).

Is there an easy way to get around this problem?

I should mention that I'm doing this to stop zero length files from
creating and there are a lot of other tasks in the package if there
are rows to process. (it would seem unnecessary processing)

Jase

Reply With Quote
  #2  
Old   
Jacco Schalkwijk
 
Posts: n/a

Default Re: DTS Stop failures - 08-12-2004 , 07:51 AM






There is a way around this problem, although you have to do some more coding
in your Active Script Task. You can enable and disable certain paths in the
workflow in code.

http://www.sqldts.com/default.aspx?218
gives a complete example, including a sample DTS package.


--
Jacco Schalkwijk
SQL Server MVP


"Jase" <jase74 (AT) hotmail (DOT) com> wrote

Quote:
Hi,

Could someone please help.

I have a package that does an export to file based on SQL syntax, if
there are no rows to export from the SQL syntax then I populate a GV
with 0, after this step I have a piece of activex script to check this
variable if it is 0 then stop the package and do not run any other
task. The problem is that this causes a failure to flag (although
technically it is not failure).

Is there an easy way to get around this problem?

I should mention that I'm doing this to stop zero length files from
creating and there are a lot of other tasks in the package if there
are rows to process. (it would seem unnecessary processing)

Jase



Reply With Quote
  #3  
Old   
mtl_jf
 
Posts: n/a

Default Re: DTS Stop failures - 08-12-2004 , 10:21 AM



Try to change de settings of the task ...

Set oPkg = DTSGlobalVariables.Parent
oPkg.Steps("DTSStep_DTSDynamicPropertiesTask_1").F ailPackageOnError = False

Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS Stop failures - 08-12-2004 , 12:26 PM



In message <399e053d.0408120225.2cfb947b (AT) posting (DOT) google.com>, Jase
<jase74 (AT) hotmail (DOT) com> writes
Quote:
Hi,

Could someone please help.

I have a package that does an export to file based on SQL syntax, if
there are no rows to export from the SQL syntax then I populate a GV
with 0, after this step I have a piece of activex script to check this
variable if it is 0 then stop the package and do not run any other
task. The problem is that this causes a failure to flag (although
technically it is not failure).

Is there an easy way to get around this problem?

I should mention that I'm doing this to stop zero length files from
creating and there are a lot of other tasks in the package if there
are rows to process. (it would seem unnecessary processing)

Jase
I think the best way off doing this would be to use a workflow script.
They are really designed for this type of situation and even have result
just for it -DTSStepScriptResult_DontExecuteTask

I've illustrated the same type of problem but for a missing file as
opposed to missing SQL data -

How can I check if a file exists?
(http://www.sqldts.com/default.aspx?211)
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #5  
Old   
Jase
 
Posts: n/a

Default Re: DTS Stop failures - 08-12-2004 , 01:36 PM



Thanks for the reply.

The workflow example was exactly how I've got round the problem.


"Jacco Schalkwijk" <jacco.please.reply (AT) to (DOT) newsgroups.mvps.org.invalid> wrote

Quote:
There is a way around this problem, although you have to do some more coding
in your Active Script Task. You can enable and disable certain paths in the
workflow in code.

http://www.sqldts.com/default.aspx?218
gives a complete example, including a sample DTS package.


--
Jacco Schalkwijk
SQL Server MVP


"Jase" <jase74 (AT) hotmail (DOT) com> wrote in message
news:399e053d.0408120225.2cfb947b (AT) posting (DOT) google.com...
Hi,

Could someone please help.

I have a package that does an export to file based on SQL syntax, if
there are no rows to export from the SQL syntax then I populate a GV
with 0, after this step I have a piece of activex script to check this
variable if it is 0 then stop the package and do not run any other
task. The problem is that this causes a failure to flag (although
technically it is not failure).

Is there an easy way to get around this problem?

I should mention that I'm doing this to stop zero length files from
creating and there are a lot of other tasks in the package if there
are rows to process. (it would seem unnecessary processing)

Jase

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.