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.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************