473,547 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

recordset data getting truncted during response.write

I have an ASP app that we've moved from a Windows 2000 to a Windows
2003 server (sql server 2000 to sql server 2005). The job runs fine on
the old servers.

Part of the app takes a recordset and response.writes out comma
delimited strings so that the results are opened in Excel or saved to a
flat file.

Basically, it looks something like this like this:

Response.AddHea der
"Content-Disposition","a ttachment;filen ame=Report.csv"
Call WriteHeader() ' Write out the headers for the columns below
For i = 1 to Ubound(arrRS, 2)

Response.write """" & arrRS(arrPONumb er, i) & """" & ","
Response.write arrRS(arrRevNum ber, i) & ","
Response.write """" & arrRS(arrPOStat usDesc, i) & """" & ","
Response.write """" & arrRS(arrLicNam e, i) & """" & ","
Response.write arrRS(arrOrderD ateStamp, i) & ","
Response.write arrRS(arrOrderD ate, i) & ","
Response.write arrRS(arrBuyCyc leStamp, i) & ","
Response.write arrRS(arrShipDa te, i) & ","
Response.write arrRS(arrConfSh ipDate, i) & ","
Response.write arrRS(arrCurrSh ipDate, i) & ","
Response.write arrRS(arrSD, i) & ","
Response.write vbCrLf
Next

When we moved it over to the new servers, the job started to have
problems. If I run the underlying sproc in sQL Server,
it returns about 17K records. If I run it in the ASP app, it only pulls
back about 2K records and the header section at the top is missing.

When I run it in the ASP page, I seem to only get the last X number of
records. It's like it sends out the first large chunk of records,
throws them away and then displays what's remaining.

If I changed the job to only show records 1 - 10000, it's fine.

If I change it to show records 1 - 10718, it's fine.

If I show 1 - 10719 records it craps out and only shows 2 rows of data
and no header.

If I show 1000 - 11718, it's fine.

I commented out all columns and started adding them back in, but I
can't identify a single column that's causing the problems.

I've cached the Responses and used Response.flush.

I changed the timeout on the IIS server to 900 (same as the old server)
with no love. I don't see any information indicating a maximum amount
of bytes that can be sent anywhere.

What the heck?? Any other ideas you might have would be appreciated.

Jan 22 '07 #1
4 4315
cb*********@gma il.com wrote:
I have an ASP app that we've moved from a Windows 2000 to a Windows
2003 server (sql server 2000 to sql server 2005). The job runs fine on
the old servers.

Part of the app takes a recordset and response.writes out comma
delimited strings so that the results are opened in Excel or saved to
a flat file.

Basically, it looks something like this like this:

Response.AddHea der
"Content-Disposition","a ttachment;filen ame=Report.csv"
Call WriteHeader() ' Write out the headers for the columns below
For i = 1 to Ubound(arrRS, 2)

Response.write """" & arrRS(arrPONumb er, i) & """" & ","
Response.write arrRS(arrRevNum ber, i) & ","
Response.write """" & arrRS(arrPOStat usDesc, i) & """" & ","
Response.write """" & arrRS(arrLicNam e, i) & """" & ","
Response.write arrRS(arrOrderD ateStamp, i) & ","
Response.write arrRS(arrOrderD ate, i) & ","
Response.write arrRS(arrBuyCyc leStamp, i) & ","
Response.write arrRS(arrShipDa te, i) & ","
Response.write arrRS(arrConfSh ipDate, i) & ","
Response.write arrRS(arrCurrSh ipDate, i) & ","
Response.write arrRS(arrSD, i) & ","
Response.write vbCrLf
Next

When we moved it over to the new servers, the job started to have
problems. If I run the underlying sproc in sQL Server,
it returns about 17K records. If I run it in the ASP app, it only
pulls back about 2K records and the header section at the top is
missing.

When I run it in the ASP page, I seem to only get the last X number of
records. It's like it sends out the first large chunk of records,
throws them away and then displays what's remaining.

If I changed the job to only show records 1 - 10000, it's fine.

If I change it to show records 1 - 10718, it's fine.

If I show 1 - 10719 records it craps out and only shows 2 rows of data
and no header.

If I show 1000 - 11718, it's fine.

I commented out all columns and started adding them back in, but I
can't identify a single column that's causing the problems.

I've cached the Responses and used Response.flush.

I changed the timeout on the IIS server to 900 (same as the old
server) with no love. I don't see any information indicating a
maximum amount of bytes that can be sent anywhere.

What the heck?? Any other ideas you might have would be appreciated.
I assume you've verified via Response.Write Ubound(arrRS, 2)
that the array (I assume you are generating it via GetRows) contains the
expected number of records.

I would use fso to write this data to a file on the server so you can
get some clues from it. You might want to consider streaming the file to
response instead of directly writing the data to Response.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jan 22 '07 #2
Hi Bob:

Bob Barrows [MVP] wrote:
I assume you've verified via Response.Write Ubound(arrRS, 2)
that the array (I assume you are generating it via GetRows) contains the
expected number of records.
Yes, I'm using GetRows, and the array does contain the proper number of
records.
I would use fso to write this data to a file on the server so you can
get some clues from it. You might want to consider streaming the file to
response instead of directly writing the data to Response.
I did this and the file created looks fine. Is there some kind of
limitation on the Response.Write method and IIS6? Why would this work
on the old server and not the new?

I'll try the streaming bit and let you know if that works.

Thanks!

Chris

Jan 23 '07 #3
cb*********@gma il.com wrote:
Hi Bob:

Bob Barrows [MVP] wrote:
>I assume you've verified via Response.Write Ubound(arrRS, 2)
that the array (I assume you are generating it via GetRows) contains
the expected number of records.

Yes, I'm using GetRows, and the array does contain the proper number
of records.
>I would use fso to write this data to a file on the server so you can
get some clues from it. You might want to consider streaming the
file to response instead of directly writing the data to Response.

I did this and the file created looks fine.
So we've successfully eliminated data corruption. I suppose you've tried
browsing to the file you created to ensure that you can at least do
that.
Is there some kind of
limitation on the Response.Write method and IIS6?
None that I know of. There IS a limit on the size of the Request that
can be adjusted, but I've never seen a limit on the size of the
Response.
Why would this work
on the old server and not the new?
Got me. Sorry.
>
I'll try the streaming bit and let you know if that works.
Good luck.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jan 23 '07 #4
cb*********@gma il.com wrote:
I did this and the file created looks fine. Is there some kind
of limitation on the Response.Write method and IIS6?
There *is* a metabase value AspBufferingLim it that could be the culprit, but
it seems to me you should get the "response buffer limit exceeded" exception
rather than a truncated table.

Since you appear to get all of the data, try flushing the buffer with each
pass through the recordset:
Response.write arrRS(arrSD, i) & ","
Response.write vbCrLf
Response.Flush ' <--- Right here ---
Next


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Jan 25 '07 #5

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

Similar topics

3
3224
by: Andie | last post by:
Hello All, How would I go about using a disconnect recordset and select (x) records from it, x being the number of records to be selected. Many thanks in advance. -- Andie
1
2577
by: Anand | last post by:
Hi i am having trouble adding a recordset into the access database, the code seems to be working fine it passs and parses through all variables just fine without showing any errors and also when i access the recordset it displays the results, what the real issue is that the entry is not made into the database even though i use the Update...
4
5310
by: Eli Sidwell | last post by:
Trying to return a Recordset to an ASP and the Recordset is empty. The StorredProc works in the query analyzer and it even works from a quick VB app that I wrote to test it. The storedproc that I am using is fairly complex (creates some temporary tables and populates them with 'Insert Into Select ...', but the during testing the only Select...
1
1619
by: Andrew Banks | last post by:
I've been handed an ASP project and having worked on .NET for the past year I have completely forgotten what to do. I am querying a SQL server DB and returning XML. The following code seems to work for small amounts of data but with any thing significant (10 records!) the XML is returned incomplete. After testing various things I can only...
8
2291
by: dmiller23462 | last post by:
My brain is nuked....Can anybody tell me right off the bat what is wrong with this code? Along with any glaring errors, please let me know the syntax to display a message (Response.Write would be fine I think) that will say "I'm sorry but the data you requested cannot be found" or something along those lines.... This code is on an archive...
9
24301
by: Johnfli | last post by:
ADODB.Recordset error '800a0cb3' Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype. I am moving my webserver from NT4 using SQL to win2003 using SQL 2003 I get the above error when my asp page does teh line: Rs.absolutepage = intCurrentPage I tested teh value of...
11
2722
by: altreed | last post by:
Hi, I am new to ASP, HTML and iis. I have my asp code working so that I can retrieve my desired record from the database. I can place the data on the screen in table form. All works fine. I wish to evaluate one field in the record and depending on the value in that field I wish to change the colour of the line in the table. As
0
1862
by: sonasiva | last post by:
hai Iam creating website using ASP i wnts my clients to register first to vist site using username and password,,this i need to do iam getting error like this ADODB.Recordset (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. in line objRS.Open mySQL, objConn,adOpenKeyset,...
6
1629
by: =?Utf-8?B?ZWdzZGFy?= | last post by:
I'm having issues to use my recordset, this is the error I'm getting: ResponsablePropuesta.Observaciones Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:...
0
7507
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...
0
7698
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. ...
0
7947
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...
1
7461
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7794
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...
1
5361
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...
0
5080
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...
1
1922
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
747
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...

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.