Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP code bombs out after SQL retrieve with over thousands of records

Reply
Thread Tools

ASP code bombs out after SQL retrieve with over thousands of records

 
 
LetMeDoIt
Guest
Posts: n/a
 
      05-18-2007
Greetings,

I'm using ASP to retrieve from MSSQL and I then populate a table.
After several months of successfull retrieves, this same code now
bombs out. It turns out that if I clear out from SQL about 10,000
records, the retrieve is then successfull.

Reading some of the posts, I believe I need to set the cache. If
anyone can point out where that cache, it would be greatly
appreciated...

regards, letmedoit.

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      05-19-2007
LetMeDoIt wrote:
> Greetings,
>
> I'm using ASP to retrieve from MSSQL and I then populate a table.
> After several months of successfull retrieves, this same code now
> bombs out. It turns out that if I clear out from SQL about 10,000
> records, the retrieve is then successfull.
>
> Reading some of the posts, I believe I need to set the cache. If
> anyone can point out where that cache, it would be greatly
> appreciated...
>


Just posting to echo Dave's comments, and to add:
Why are you retrieveing ALL the records in your database table? You should
be using a WHERE clause to limit the number of records retrieved. What user
is going to want to browse through thousands of records? At the very least,
consider using a paging solution such as described here:
http://www.aspfaq.com/show.asp?id=2120

You might also wish to consider generating a summary of the records and
displaying that to the users instead of the mass of details.

--
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"


 
Reply With Quote
 
 
 
 
LetMeDoIt
Guest
Posts: n/a
 
      05-21-2007
On May 19, 9:41 am, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
> LetMeDoIt wrote:
> > Greetings,

>
> > I'm usingASPto retrieve from MSSQL and I then populate a table.
> > After several months of successfull retrieves, this samecodenow
> >bombsout. It turns out that if I clear out from SQL about 10,000
> > records, the retrieve is then successfull.

>
> > Reading some of the posts, I believe I need to set the cache. If
> > anyone can point out where that cache, it would be greatly
> > appreciated...

>
> Just posting to echo Dave's comments, and to add:
> Why are you retrieveing ALL the records in your database table? You should
> be using a WHERE clause to limit the number of records retrieved. What user
> is going to want to browse through thousands of records? At the very least,
> consider using a paging solution such as described here:http://www.aspfaq.com/show.asp?id=2120
>
> You might also wish to consider generating a summary of the records and
> displaying that to the users instead of the mass of details.
>
> --
> 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"


My apologies for the cryptic paragraph. Thanks for the responses.

To answer a few questions that arose earlier:
1- There is a WHERE clause for the users, which when used, works
well. The users enter a specific string, and upon selecting the
RETRIEVE button, records are returned and put in columns and rows.
This works as expected.
2- By clearing out records from the SQL database, I mean, I actually
delete these records by typing the SQL command "delete from mytable
where..."
3- There are instances where a few users may want to see all records,
that is why that option is there. Currently, typing % and selecting
RETRIEVE from a button fetches all records
4- What I mean by "Bombing out" is that when all records are retrieved
(ie, when % is entered), instead of each records going to each row/
column within the table I created, these records are 'dumped' into my
html page (as in there are no rows and columns, thus no carriage
returns and line feed, each records continues from the same row from
the previous record, etc)

Regards.

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      05-21-2007
LetMeDoIt wrote:
> On May 19, 9:41 am, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
> wrote:
>> LetMeDoIt wrote:
>>> Greetings,

>>
>>> I'm usingASPto retrieve from MSSQL and I then populate a table.
>>> After several months of successfull retrieves, this samecodenow
>>> bombsout. It turns out that if I clear out from SQL about 10,000
>>> records, the retrieve is then successfull.

>>
>>> Reading some of the posts, I believe I need to set the cache. If
>>> anyone can point out where that cache, it would be greatly
>>> appreciated...

>>
>> Just posting to echo Dave's comments, and to add:
>> Why are you retrieveing ALL the records in your database table? You
>> should
>> be using a WHERE clause to limit the number of records retrieved.
>> What user
>> is going to want to browse through thousands of records? At the very
>> least,
>> consider using a paging solution such as described
>> here:http://www.aspfaq.com/show.asp?id=2120
>>
>> You might also wish to consider generating a summary of the records
>> and
>> displaying that to the users instead of the mass of details.
>>
>> --
>> 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"

>
> My apologies for the cryptic paragraph. Thanks for the responses.
>
> To answer a few questions that arose earlier:
> 1- There is a WHERE clause for the users, which when used, works
> well. The users enter a specific string, and upon selecting the
> RETRIEVE button, records are returned and put in columns and rows.
> This works as expected.
> 2- By clearing out records from the SQL database, I mean, I actually
> delete these records by typing the SQL command "delete from mytable
> where..."
> 3- There are instances where a few users may want to see all records,
> that is why that option is there. Currently, typing % and selecting
> RETRIEVE from a button fetches all records
> 4- What I mean by "Bombing out" is that when all records are retrieved
> (ie, when % is entered), instead of each records going to each row/
> column within the table I created, these records are 'dumped' into my
> html page (as in there are no rows and columns, thus no carriage
> returns and line feed, each records continues from the same row from
> the previous record, etc)
>
> Regards.


By deleting records, you are effectively limiting the number of records
the user can retrieve. My suggestion would be to make this explicit by
using the TOP n keyword in your query. Combined with a paging solution,
you should avoid the problem described above.

Without knowing how to reproduce your symptoms, we have no chance of
being able to tell you what the problem is. It is probably related to
the technique you are using to extract the data values from the
recordset and write them 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VOIP over VPN over TCP over WAP over 3G Theo Markettos UK VOIP 2 02-14-2008 03:27 PM
Simple query returns 0 records in asp, but all records in vbscript masg0013@gmail.com ASP General 3 11-02-2006 09:23 AM
REXML bombs out in a javascript section of a well formed XHTML document Xeno Campanoli Ruby 2 07-01-2005 07:48 PM
How to retrieve the records if I have .SQL script file using ADO.net Kiran ASP .Net Datagrid Control 4 10-14-2003 08:38 PM
Fastest way to get thousands of db records to client in 3 tier? R. Alan Monroe Python 8 09-26-2003 04:14 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57