cancel
Showing results for 
Search instead for 
Did you mean: 

System.OutOfMemoryException

Former Member
0 Kudos

Hi experts,

In my SAP addon i have a report..for that report query A will retrieve 45,000 records...& another query B will retireve 35 records.

so based on the loop:

function 1
                 For Each in B.rows.count-1 '35 records
                                    For each in A.rows.count-1 '45,000 records
                                    ---------------------------------------------------
                                    ---------------------------------------------------
                                    ----------------------------------------------------
                                    Next
                 Next

         function 2  --------

         function 3  --------

so,the actual problem is when i click the print of the report due to multiple loops...the following error message was thrown......


System.OutOfMemoryException: Exception of type
System.OutOfMemoryException was thrown

can anybody suggest me some ideas that how to overcome this issue that without going to the IO exception.....iam doing my report in crystal reports 11.

regards,

dileep varma.

Accepted Solutions (1)

Accepted Solutions (1)

former_member191896
Active Participant
0 Kudos

Hi Dileep,

Using a paging query and processing smaller number of records (for example 100 records at a time) might help.

Aravind

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

An OutOfMemoryException exception is thrown when an attempt to allocate memory fails.

Be sure you have enough memory for internal purposes and new managed objects.

If you are programming on the .NET Compact Framework, the common language runtime throws this exception when there is not enough memory for internal purposes or new managed objects. To prevent the exception, avoid programming large methods that consume 64 or more kilobytes of memory.

Excessive managed memory usage is commonly caused by:

Reading large data sets into memory.

Creating excessive cache entries.

Uploading or downloading large files.

Excessive use of regular expressions or strings while parsing files.

Excessive view state.

Too much data in session state or too many sessions.

This exception may be thrown with an additional message, "Not enough storage is available to complete this operation," when invoking a method on a COM object that returns a user-defined type that contains a safe array (an array of non-fixed size). This is because the .NET Framework cannot marshal a structure field with a safe array type.

regards,

varma

Former Member
0 Kudos

hi varma,

Even i have increased the size of LOG file of my project DB & my free disk space is around 10GB.Even though iam getting this Memory out of exception.can anybody suggest me some ideas...

regards,

dileep varma.

Former Member
0 Kudos

Hi..

I thing is not ur problem.This problem happen in sap b1 installation. u have any doubt search forum itself is there.

Regards...

Billa 2007

Former Member
0 Kudos

hi billa,

Thanks for ur reply.how can you say it's with installation problem...I have installed the SAP as the procedure given in the help & as like with our technical team.So,to overcome these problem is there any solution???

Even iam unable to get the previous threads when i search in the SDK forum.

Regards,

dileep varma.

Former Member
0 Kudos

Hi.

Search Terms:System.OutOfMemoryException

Category or Forum: sap Business one

Date Range: All

Regards..

Billa 2007