473,698 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
element.

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.CreateOb ject("Scripting .FileSystemObje ct")
set oFile = oFSystem.Create TextFile (strFile, True, False)

all records are written with the oFile.WriteLine method

and is closed with

oFile.Close
set oFile = Nothing
set oFSystem = Nothing

Any ideas?

Thanks
David
Nov 12 '05 #1
0 1251

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
6112
by: JC | last post by:
I am using Mysql version: 4.0.18-max-log and trying to populate a database from a text file using source option from inside the mysql environment. The population run OK but when creating the indexes i get < ----- ERROR -------------> Query OK, 1 row affected (0.00 sec)
1
4861
by: Mike | last post by:
Help, I am using an encryption routine that occasionally will encrypt a string using some extended ASCII characters (ASCII code > 128) I am wondering if there is a reserved character in VB that signifies the end of a string of characters. Here is what happens: I am encrypting certain fields before adding them to a SQL string. On occassion, the SQL string will simply end in the middle of the encrypted value.
2
3771
by: sp | last post by:
Hello everybody, I have an xml doc and I am trying to write the values from xml file to a tab delimited text file. Currently, what I am doing is I am reading xml file through XpathNavigaotr and manipulating all the nodes,elements and attributes than I am writing those values to a text file using stream writer. Now coming to my problem When I am writing data to the text file value of the last record is getting truncated. My code sample...
2
1599
by: seash | last post by:
H iam developing my windows form application(ide:visual studio.net 2003, visual c#) on windows 2000 professional operating system , but when i run the exe on Xp operating system, the screen (windows form) of my application gets truncated at the end of the screen i have to make changes to the forms height and width to make it fully visible on the screen iam using infragistics library for some controls on the form, is it the culprit i...
5
2217
by: Bertus Dam | last post by:
Hi, When I use System.Web.Mail.MailMessage to send an e-mail, my message gets truncated. It's 12kB instead of 140kB. How can I solve this?? Bertus
12
2222
by: Jack | last post by:
Since, I have not got some desired advise, I am reposting this for some asnwer/valuable suggestion. Thanks. THE FOLLOWING IS A PART OF CODE FROM A ASP PAGE <% sql01 = "SELECT COUNT(*) AS reccount FROM Equipmenttbl " sql01 = sql01 & "WHERE Equipmenttbl.GrantID = " & GrantID
1
2140
by: Mr fahad | last post by:
#include <stdio.h> #include <conio.h> void main (void) { char ch; FILE *fp; fp=fopen ("fahd.txt","w"); while (ch=fgetc( )!='\r') fputc (ch,fp); fclose (fp);
1
1740
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post by:
I am using Windows Media Player to play my half second audio files one after the other using the code below... My problem comes when I play a second audio file immediately after the first one stops sometimes on slower computers the audio on the second file gets truncated on the beginning of playing the second file. What can I do to minimize this truncation of audio? Right now I am having to add 1 second of blank audio to the beginning...
8
18706
by: AccessBeetle | last post by:
Hello, I am using Access 2007. I have created a query which is the recordsource of one of the reports. This query is just a simple query without any conditions on any fields, it does have multiple tables. When I run the query the memo field gets truncated and that is why in the report it does not show full amount of text. How to fix this problem? Thanks for any help!!
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.