473,790 Members | 3,185 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception of type System.OutOfMem oryException is thrown

Hi,
There are several pages that occasionally start throwing
System.OutOfMem oryException and "The type initializer for
"Microsoft.Prac tices.Enterpris eLibrary.Data.I nstrumentation. DataCommandFail edEvent
exception."
The problem goes away after iisreset .

- Actually on Excel Exporting this error happens and stops all the
applications in the server
- It exceeds more than 1GB size, i hope so in server
-

How to solve this problem? How to reduce size of Dataset when exporting
to excel file?
Help me out in this...
Thanks in advance

-karups

Oct 18 '06 #1
1 2367
My application will have a fetch button.
As soon as we click the fetch button..It calls a Stored Procedure.
The stored procedure will return a dataset back(huge on with rows 25000
and col:52)...
I export this dataset to excel using this code

Response.Clear( );
Response.AddHea der("content-disposition",
"attachment;fil ename="+filenam e+".xls");
Response.Charse t = "";
this.EnableView State=false;
Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);
Response.Conten tType = "applicatio n/vnd.xls";
System.IO.Strin gWriter stringWrite = new System.IO.Strin gWriter();
System.Web.UI.H tmlTextWriter htmlWrite = new
HtmlTextWriter( stringWrite);
DataGrid myDataGrid=new DataGrid();
myDataGrid.Data Source=dsReport .Tables[1];
myDataGrid.Data Bind();
myDataGrid.Rend erControl(htmlW rite);
Response.Write( stringWrite.ToS tring());
Response.End();

While doing this i get the OutOfMemoryExce ption..

Oct 18 '06 #2

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

Similar topics

42
2395
by: cody | last post by:
public DateTime Value { get { try { return new DateTime(int.Parse(tbYear.Text), int.Parse(tbMonth.Text), int.Parse(tbDay.Text)); } catch (FormatException)
6
1999
by: Ali-R | last post by:
I'm using a .Net application to execute DTS packages within Sqlserver,I need to have very customizable and powerful Exception maangement systems which loggs different issues happend in the DTS package with my own errorCode. Can somebody give me some ideas? Thanks
40
13536
by: Kevin Yu | last post by:
is it a bad programming design to throw exception in the try block then catch it??
1
3453
by: Ripul Handa | last post by:
Hi We are running IIS 5.0 cluster with cisco local director. We are running a website on 2 webservers and I have been observing that from past few days we have are getting this error message of and on Error Messag Remote IP:66.122.242.6 Host:216.211.212.2
11
21032
by: Pete Davis | last post by:
I have an app that's dealing with a few hundred bitmap thumbnails. I only instantiate the bitmaps that are visible at a given time and dispose of them if they get scrolled out of view. I've used the .NET memory profiler and I've verified there's no leak in my bitmaps, nor are there any other apparent leaks. So, at a given time, there may be 30 or so bitmaps displayed at a given time. Still, somehow, I'm getting random errors in the...
1
4995
by: SMG - Idealake | last post by:
Hi all, I am getting following error on my error, what could be the reason? Exception of type System.OutOfMemoryException was thrown. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown.
3
1848
by: elziko | last post by:
I have a procedure that creates a bitmap of a certain size and then displays it in a 3rd party component. However, if the bitmap is very large then a System.OutOfMemoryException is thrown my something but my codes breaks at the difition of my class: "Public Class MainForm" ....so I'm assuming that the OutOfMemoryException occurs in the 3rd party since I have put a Try-Catch block around my bitmap creation code and I am
5
7782
by: karups | last post by:
Hi, There are several pages that occasionally start throwing System.OutOfMemoryException and "The type initializer for "Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent exception." The problem goes away after iisreset . - Actually on Excel Exporting this error happens and stops all the
11
7036
by: Don | last post by:
When using Visual Basic .NET with a reference to Interop.Outlook, is there a way to get more detailed information about an error other than Exception.Message or Exception.ToString? For example, Outlook's MailItem.SaveAs method can return an error message of "The operation failed", but I have no idea what that means. As a test, I tried SaveAs using a filename that contained illegal characters and got the error message "Internal Application...
1
7993
by: chandhrakv | last post by:
Hi experts, Can any one please respond with the resolution. Machine: WIN2K3, ASP.NET application, .NET 2.0 with June 2007 hotfix installed recently. Facing daily 1000 errors with the same type hopefully. Please assist. ----- Event code: 3005 Event message: An unhandled exception has occurred. Event time: 11/18/2009 10:48:23 AM Event time (UTC): 11/18/2009 5:18:23 AM Event ID: 6418c83513d4492bb14bc36994b95996
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9512
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10419
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10201
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9987
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7531
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5552
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.