dbTalk Databases Forums  

Any solution to this frustrating DTS 'feature'?

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


Discuss Any solution to this frustrating DTS 'feature'? in the microsoft.public.sqlserver.dts forum.



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

Default Any solution to this frustrating DTS 'feature'? - 08-05-2005 , 07:40 AM






Just wondering if anyone can suggest any solution to a problem I am having.
I currently have a DTS package which is reading in a CSV file on a daily
basis, the only trouble is that sometimes this CSV file can be of size 0.
Common sense tells you that DTS should notice this and simply read in 0 rows.
However, DTS fails the step and subsequently, the package. Is there any way
to prevent it failing the step due to a file of zero size?

If not, is there any way to force the step to succeed once it has failed
through an ActiveX script or something similar?

Thanks for your time.

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

Default Re: Any solution to this frustrating DTS 'feature'? - 08-05-2005 , 07:42 AM






Use this -

How can I check if a file exists?
(http://www.sqldts.com/default.aspx?211)

with this-

Working with files and the FileSystemObject - See File Size section.
(http://www.sqldts.com/default.aspx?292)


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"Lee" <Lee (AT) discussions (DOT) microsoft.com> wrote

Quote:
Just wondering if anyone can suggest any solution to a problem I am
having.
I currently have a DTS package which is reading in a CSV file on a daily
basis, the only trouble is that sometimes this CSV file can be of size 0.
Common sense tells you that DTS should notice this and simply read in 0
rows.
However, DTS fails the step and subsequently, the package. Is there any
way
to prevent it failing the step due to a file of zero size?

If not, is there any way to force the step to succeed once it has failed
through an ActiveX script or something similar?

Thanks for your time.



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

Default Re: Any solution to this frustrating DTS 'feature'? - 08-05-2005 , 09:37 AM



Thank you, that worked great. Unfortunately it has created another slight
problem. At this stage in the DTS package I have several CSV's which are
imported simultaneously and after processing , or not processing them all(due
to provided solution) it goes on to do another task using an 'On Completion'
workflow arrow.

The problem is that when I dont execute one of the import tasks due to
filesize being 0, the 'On Completion' workflow criteria is not met and the
package stops executing. All of the files must have been attempted to be
imported previous to doing the processing afterwards.

Thanks for your help.

"Darren Green" wrote:

Quote:
Use this -

How can I check if a file exists?
(http://www.sqldts.com/default.aspx?211)

with this-

Working with files and the FileSystemObject - See File Size section.
(http://www.sqldts.com/default.aspx?292)


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"Lee" <Lee (AT) discussions (DOT) microsoft.com> wrote in message
news:8F10B930-6479-48A5-8A4B-136221F445A4 (AT) microsoft (DOT) com...
Just wondering if anyone can suggest any solution to a problem I am
having.
I currently have a DTS package which is reading in a CSV file on a daily
basis, the only trouble is that sometimes this CSV file can be of size 0.
Common sense tells you that DTS should notice this and simply read in 0
rows.
However, DTS fails the step and subsequently, the package. Is there any
way
to prevent it failing the step due to a file of zero size?

If not, is there any way to force the step to succeed once it has failed
through an ActiveX script or something similar?

Thanks for your time.




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.