Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 System.OutOfMemoryException

Author  Topic 

salmonraju
Yak Posting Veteran

54 Posts

Posted - 2008-04-08 : 07:58:30
Hi,
I am using Asp.net 1.1 , I am fetching some data for oracle database and i am displaying this data in Datagrid

I am getting the following exception :
Exception of type System.OutOfMemoryException was thrown.

My query is returning 1,20,000 recoreds (when i copied the resultset to notepad it
14 MB)

After searching in internet i updated my web.config as

<httpruntime maxrequestlength="1048576" />

But this is also not working.

Please suggest me.

ayamas
Aged Yak Warrior

552 Posts

Posted - 2008-04-08 : 08:07:25
But maxrequestlength has nothing to do with fetching records from database.It is used to set the maximum file size which can be uploaded in the application.
Please post some of your code & state where you are getting the error.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-04-08 : 08:09:15
120.000 isn't recommended for a dataset.
why do you need to return this much data to the client?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-04-08 : 09:47:19
DataSet is a memory pig.

If you really need to cache that many rows on the client, you should fetch them with IDataReader and create a List<MyStruct> or similar. store them in something lightweight, not DataSet.


elsasoft.org
Go to Top of Page
   

- Advertisement -