Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DTS Package Error Handling

Posted on 2006-10-25
8
Medium Priority
?
318 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17808278
If there is an error the file is not created.
0
 

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 1000 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 1000 total points
ID: 17808354
Or simply:

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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

636 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