Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Business Object .Net SDK : access voiation expection

Status
Not open for further replies.

touchwithbabu

IS-IT--Management
Oct 21, 2010
4
0
0
US
Hi

We are developing ASP.net application with .net SDK. When we call BO report for the first no issues. But If we try to l different report or same report with different prompt value. We get memory error.

Please help.

Acess violation exception : Attempted to read or write protected memory . This is often an indicatioon that other memory is corrupt
 
Something to remember about working with the BOE .NET SDK - it is a wrapper around COM components. .NET does not automatically handle memory management for COM components very well. So, you need to explicitly do this in your code using one of two methods:

1. When possible, use the "Using" command - something like this:

Using (InfoObjects myInfoObjects = myInfostore.Query(queryStr))
{
}

At the end of the Using, the object, in this case an InfoObjects object, is automatically disposed.

2. When it is not possible to use "Using", explicitly call the .Dispose() method of the object. I use this method in the FormClosing event handler of a WinForms program to dispose of the InfoStore and EnterpriseSession objects that are used throughout the program.

-Dell


A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top