Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Data Warehousing / May 2005

Tip: Looking for answers? Try searching our database.

Check File size before importing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
deheinz1 - 09 May 2005 21:57 GMT
I have a DTS procedure that runs 4 times a day.  It has worked well until
now.  It is reading infromation from a text file. Today the text file was
empty and DTS failed giving me this error; "The volume for a file has been
externally altered so that the opened file is no longer valid.".  I believe
this is happening because the file size is  0 K bytes (This file is
constantly overwriitten).  Is there a way before importing a text file to
check and verify that the file is not empty?
Paul Smith - 10 May 2005 06:42 GMT
Use FSO (File System Object) to check the size first in an ActiveX script,
you can find an exampl on sqldts.com

>I have a DTS procedure that runs 4 times a day.  It has worked well until
> now.  It is reading infromation from a text file. Today the text file was
[quoted text clipped - 4 lines]
> constantly overwriitten).  Is there a way before importing a text file to
> check and verify that the file is not empty?
JT - 13 May 2005 22:02 GMT
Even confirming that the file size is > 0 may not indicate reliably that the
source data transfer has completed. I have a similar situation where files
are being FTP'd from the mainframe and can take 1/2 or more to complete
(assuming they do complete). My solution was to ask the data processing
staff to download the file with an extention of .TMP and then rename it to
.DAT after the download is complete.

> I have a DTS procedure that runs 4 times a day.  It has worked well until
> now.  It is reading infromation from a text file. Today the text file was
[quoted text clipped - 3 lines]
> constantly overwriitten).  Is there a way before importing a text file to
> check and verify that the file is not empty?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.