Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / January 2008



Tip: Looking for answers? Try searching our database.

ASP page losing formatting with large ADO recordset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
miwebster@gmail.com - 15 Jan 2008 00:17 GMT
I'm using ASP classic and Ado to pull data from SQL Server 2000.

I have a recordset with about 6500 rows, but quite a few (35-40)
columns of mostly text data, that I'm trying to display on a page.
I'm filtering the data with drop downs on entry to reduce the amount
of records shown. and it works fine.  But my boss wants to be able to
see every record (without paging, I can't talk him out of it).  When I
remove the filter (actually when the record size gets to about 4500
records), I lose all the formatting on the page and it just spits out
the data.  My buttons and filters on the top of the page are just
gone, and it just fills the page with raw data.  It still seems to
loop through the recordset okay, and does display all the data, but
not in a legible fashion.
I've looked to increase the MaxRows value of the recordset, but that
doesn't seem to help.

Any help would be greatly appreciated.

Thanks,
Mike
Evertjan. - 15 Jan 2008 10:38 GMT
wrote on 15 jan 2008 in microsoft.public.inetserver.asp.db:

> I'm using ASP classic and Ado to pull data from SQL Server 2000.
>
[quoted text clipped - 11 lines]
> I've looked to increase the MaxRows value of the recordset, but that
> doesn't seem to help.

Look at the view source of the html in the browser.

By seeing this rendered html you can see
if you made an serverside asp coding mistake,
or if the browser cannot cope with such large amount of data.
Did you test both IE7 and FF2?

BTW: Why do you use a recordset?
If it is a straight forward showing of a database with an sql,
the mData.MoveNext command will suffice.

Signature

Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Bob Barrows [MVP] - 15 Jan 2008 11:45 GMT
> BTW: Why do you use a recordset?
> If it is a straight forward showing of a database with an sql,
> the mData.MoveNext command will suffice.

This puzzled me. MoveNext is a recordset method. What kind of object is
mData?

Signature

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Evertjan. - 15 Jan 2008 17:33 GMT
Bob Barrows [MVP] wrote on 15 jan 2008 in
microsoft.public.inetserver.asp.db:

>> BTW: Why do you use a recordset?
>> If it is a straight forward showing of a database with an sql,
>> the mData.MoveNext command will suffice.
>
> This puzzled me. MoveNext is a recordset method.

Oh terminology. I mean you could get the data one record at a time
from an sql execute, you would not call that a record set, I hope?

> What kind of object is  mData?

Just mu favoured name in:

set mData = CONNECT.Execute(SQL)

[don't ak why COMMECT]

Signature

Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Bob Barrows [MVP] - 15 Jan 2008 18:00 GMT
> Bob Barrows [MVP] wrote on 15 jan 2008 in
> microsoft.public.inetserver.asp.db:
[quoted text clipped - 7 lines]
> Oh terminology. I mean you could get the data one record at a time
> from an sql execute, you would not call that a record set, I hope?

A set can consist of a single element, so I'm not sure why I wouldn't
call the object returned from the execute method a "recordset"?
I'm not trying to argue here, I'm just trying to understand your point.
How is retrieving a single record relevant to the OP's problem? Or are
you just stating an example to help illustrate the point you were
making?

>> What kind of object is  mData?
>
> Just mu favoured name in:
>
> set mData = CONNECT.Execute(SQL)

Since the ADODB Execute method returns an ADODB Recordset object, and in
this case assigns it to the mData variable, ISTM you are using a
recordset object n'est-ce pas?

Unfortunately, the OP did not provide enough information to enable us to
help him beyond this speculation. 6500 records of the size he describes
does seem to be an awful lot to be dumping onto a single page. I don't
understand the restriction against paging, but then again, I doubt the
boss understands the ramifications of his requirements.

Signature

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.

Evertjan. - 15 Jan 2008 22:07 GMT
Bob Barrows [MVP] wrote on 15 jan 2008 in
microsoft.public.inetserver.asp.db:

>> Oh terminology. I mean you could get the data one record at a time
>> from an sql execute, you would not call that a record set, I hope?
[quoted text clipped - 5 lines]
> you just stating an example to help illustrate the point you were
> making?

I was commenting on my lack of terminology in db programming,
not your expertise, Bob.

Signature

Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Sylvain Lafontaine - 16 Jan 2008 17:42 GMT
Maybe your page is simply to big for IE.  Did you take a look at the at the
HTML source to see if it was right or not?

Another possibility is that there is some kind of HTML makeup error on the
page and IE stop counting them after some point; with the side effect that
it stop trying rendering the page.

One way to easy test for this would be to take the code source of the page
with 4000 records and then copy and paste the relevant stuff in order to
double the number of rows.  Save the page and try to open in IE.

Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)

> I'm using ASP classic and Ado to pull data from SQL Server 2000.
>
[quoted text clipped - 16 lines]
> Thanks,
> Mike
PW - 19 Jan 2008 07:29 GMT
I had a similar problem a while back.

Try putting "response.Flush" in the loop where you collect your record set,
after the movenext statement.

Similar to how I do it in this loop ...

  Do While Not rs1.EOF
     myOption = rs1("ESCI") & "  |  " & rs1("ESCN")
     response.write myOption
     response.write "<br>"
     rs1.MoveNext
     response.Flush  <------ example
  Loop

HTH,
PW
 
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



©2009 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.