By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,231 Members | 1,622 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,231 IT Pros & Developers. It's quick & easy.

Writing to a file with VBScript/ASP sometimes gets truncated - why??

P: n/a
Has anyone encountered (and solved!) this problem?

I have an Access database on a commercial ISP. There is an ASP
page/script which creates a recordset from the database and then
writes a file which can be downloaded via the standard HTML Anchor

This has been working with no problems for months but now we sometimes
see files which are truncated, ie as if not all records in the
recordset were output.

There is a count on the web page saying how many lines were output -
this is the expected value but there are less lines in the file. The
script seems to work perfectly and there are no errors in the IIS log
files. But sometimes the file does not contain the full set of data,
ie a section at the end is missing.

The file is opened with

set oFSystem = Server.CreateObject("Scripting.FileSystemObject")
set oFile = oFSystem.CreateTextFile (strFile, True, False)

all records are written with the oFile.WriteLine method

and is closed with

set oFile = Nothing
set oFSystem = Nothing

Any ideas?

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.