Re: Importing Empty FIle
- From: "weelin" <weelin@xxxxxxxxx>
- Date: 25 Oct 2006 05:54:44 -0700
Norman is right, I had to do something similar with zip files, though I
was checking that there were more than 4 rows by size.
You can use the File System Object to point to the file, then check the
size.
Something like this
filename="c:\test\test.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
set mainfile=fso.GetFile(filename)
IF mainfile.Size > 50 Then -- this is in bytes
-- Do something
ELSE
-- Do something else
END IF
regards
Weelin
On Oct 25, 11:57 am, Norman Kelm <nor...@xxxxxxxxxxxxxxxxxxx> wrote:
Hi Phil,
Perhaps you could write an ActiveX script task that opens the error file
and counts the number of rows. Then have success and failure constraints
that point to the correct action. Success run the transform.
Norman
get DTS Package Search athttp://www.gerasus.com/
Phil wrote:
Hi,
I wonder if there is a work around for the following problem, I have a DTS
pack that imports a number of uploaded files as well as files that show
errors that we have had in the files that we have uploaded. The DTS works
fine when there are errors listed in the Error file but wont work when the
file is empty, you get the error
"Error creating datafile mapping: The volume for a file has been externally
altered so that the opened file is no longer valis."
I know that really this makes sense, but I could do with the DTS not failing
at this point, any ideas, what I would like if for it to do is complete the
DTS and just have an empty table where the files should be imported into.
Thanks PD- Hide quoted text -- Show quoted text -
.
- References:
- Re: Importing Empty FIle
- From: Norman Kelm
- Re: Importing Empty FIle
- Prev by Date: Re: Importing Empty FIle
- Next by Date: Re: DTS Transfer Job Fails
- Previous by thread: Re: Importing Empty FIle
- Next by thread: Re: DTS Transfer Job Fails
- Index(es):
Relevant Pages
|