System.OutOfMemory Exception

V

VijayRama

Hi,

I have a asp.net page which generates reports. It contains more than
30,000 records. I have used the server table class to display it. It
gives OutofMemory exception. please help.

Its not possible to increase the server memory space. Pls suggest any
other ideas.

Thanks in Advance
 
G

Gregory A. Beamer

Hi,

I have a asp.net page which generates reports. It contains more than
30,000 records. I have used the server table class to display it. It
gives OutofMemory exception. please help.

Its not possible to increase the server memory space. Pls suggest any
other ideas.

Thanks in Advance

I have no clue without seeing the code, but I can tell you why you are
runing out of memory. You are storing the complete table in memory as
you build it.

Solutions:

1. Move to a GridView, which flushes out to Response every once in
awhile. If this does not work, you can also flush from time to time. If
the default class breaks when you flush on every n lines (using the row
data bind event, you may have to write a custom GridView.

2. Add flush statements in your code. This may break the Table class
(not sure), so this might be a non-option.

3. Create your own code that writes out a table and flush lines from
time to time.

No matter what solution you use, you cannot build a complete 30,000 line
table in memory, using objects, and then flush when you are finished.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top