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 January 19th, 2006, 01:07 PM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Handling empty text files in DTS

Hi, I am trying to make a DTS package that takes several text files and ingests them into our tables. The text files are retrieved via FTP from an external source. The problem is that sometimes the text file can be empty if there is no data. Of course DTS bombs when this happens. What is the best way to handle this? I tried using an activeX script someone posted here to check the file size and return success or failure, but when I return failure, the entire DTS task stops running and my 'on failure' workflow step is ignored. I have made sure that the 'faili package on first failure' checkbox is unchecked in the package properties.
Any help would be appreciated.

Thx,
Andy

 
Old January 22nd, 2006, 12:29 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

One workaround that immediately comes to mind is to modify your activex script task to insert a dummy row into each of the empty text files and then after the data pump tasks do a clean up step (SQL Task) to delete the dummy rows that have been inserted.

Aside from that I would need to see the script and a brief run down of your package.

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
text box empty problem MunishBhatia ASP.NET 2.0 Professional 2 October 10th, 2007 07:39 AM
Checking to see if a label's text is empty mh JSP Basics 2 October 26th, 2005 11:05 AM
Checking to see if a label's text is empty mh ASP.NET 2.0 Basics 2 October 26th, 2005 10:38 AM
Handling an empty dataset Payback Classic ASP Basics 2 January 21st, 2005 12:42 PM





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