Solved

DTS Package Error Handling

Posted on 2006-10-25
8
312 Views
Last Modified: 2013-11-30
I am writing a vbscript active script to generate some files.  I would like to stop the creation of file when it encounters an error. Are there any examples of that anybody can share with me?  Right now what happens is that it creates the file (probably in the middle) and then stops the DTS package...  I would like to stop if from creating the file at all...  I may have to move the save file code to somewhere else...
0
Comment
Question by:RVattakunntel
  • 4
  • 2
  • 2
8 Comments
 
LVL 10

Expert Comment

by:AaronAbend
ID: 17808247
I think you can set up a workflow "failure" step and go from that step on failure and take action as needed. Sorry I cannot even open my old dts packages since upgrading to 2005.
0
 

Author Comment

by:RVattakunntel
ID: 17808251
ok.  I have a sendmail task if the active x script fails but I want to fail the dTS package if certain error occurs.
0
 
LVL 10

Expert Comment

by:AaronAbend
ID: 17808276
I suggest deleting the file in the process that fires when it fails... there should be a way to do that in activex. You may have to create a DOS command and RUN it or something like that.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17808278
If there is an error the file is not created.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

Author Comment

by:RVattakunntel
ID: 17808284
That is not a bad idea to delete the file when an error occurs.  Any examples of vbscript in doing that?
0
 
LVL 10

Expert Comment

by:AaronAbend
ID: 17808335

set oFile = oFSO.GetFile(sFilename)
oFile.Delete(True)

I think this does it
0
 
LVL 10

Accepted Solution

by:
AaronAbend earned 250 total points
ID: 17808346
wrong ... check this out

http://www.sqlservercentral.com/columnists/hji/usingvbscripttoautomatetasks.asp

(without access to dts any more it is hard to help.. but for that same reason, I know there are not many dts guys left out there so I am just trying to help as much as I can)
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 250 total points
ID: 17808354
Or simply:

Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.DeleteFile "YourFileNameGoesHere", True
Set FSO = Nothing
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now