473,473 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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.

May 18 '07 #1
4 3204
LetMeDoIt wrote:
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.
What does "clear out from SQL" mean? DELETE from the database? For that
matter, what does "bombs out" mean? You really should be specific if you
want useful responses.

Lacking your "bombs out" error message, I am guessing that ADO is timing out
on your query. In that case, you might want to bump up your CommandTimeout:

http://msdn.microsoft.com/library/en...andtimeout.asp
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...
Which cache would that be? The browser's? The global assembly cache?
Neither, obviously, but maybe you will see my point. GIGO.


--
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.
May 19 '07 #2
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"
May 19 '07 #3
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.

May 21 '07 #4
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.
May 21 '07 #5

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

Similar topics

2
by: Randy Jackson | last post by:
First of all, I apologize in advance if this is covered somewhere in a FAQ. I did a Google search, but really couldn't find anything. I'm having a problem with a simple select query. I've got...
1
by: Jay | last post by:
After upgrading from VS 2003 to VS 2005, my stable VB client code that posts xml over http to an aspx page stopped working. Somehow, asp.net (or IIS) is expecting the root url to be...
2
by: Luis P. Mendes | last post by:
Hi, I would like to know if there is a better way to do what I'm already doing as stated in the following example, when using psycopg2 with PostgresQL. ........................ nr_bars_before =...
1
by: siujean | last post by:
Hi All, I met a problem when insert over 1000 records to db2 via servlet, it show me the error message is "DB2 SQL error: SQLCODE: -911, SQLSTATE: 40001, SQLERRMC: 68 DB2ConnectionCorrelator:...
4
by: muskan | last post by:
hello, I want to fetch all the records from database one by one when I click on next button I have written this code for fetching the records from database. But it shows only first record....
3
by: kato martin | last post by:
hi, i have designed an access database query with sums and expressions. however i have failed to retrieve any recordsets from this db query in vb6.... below i the code im currently using..but each...
1
Abigail
by: Abigail | last post by:
I need to retrieve the top 250 and bottom 250 results of a table that's sorted on a 'variance in dollars' field. My boss wants to know what the top positive and bottom negative variances are... but I...
3
by: sandhu236 | last post by:
Hi all, Can anyone please help me..to take backup automatically from the frontend application (Java swing) after certain number of records REgards, SAndhya
0
by: John Keulen | last post by:
Looking for sample vb2008 code for file transfer over wifi on mobile 6.5. Details: - not using ActiveSync - not using drivemapping - pocketpc to desktop only - small files (max. 50k)
0
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,...
0
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,...
0
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...
0
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,...
1
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...
0
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...

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.