You must Sign In to post a response.
  • Category: ASP.NET

    System.outofmemoryexception

    Hi,

    I am having a rpt(crystal report). i should connect the rpt via code(Inputs for rpt) then export as PDF.finally stored in shared location. Its functioning good.

    But while export 25 k and above records getting 'System.OutOfMemoryException' OR invalid pointer error. any suggestions???


    ReportDocument.export() //here i am getting the following error

    An invalid VARIANT was detected during a conversion from an unmanaged VARIANT to a managed object. Passing invalid VARIANTs to the CLR can cause unexpected exceptions, corruption or data loss.

    catch (Exception ex) //in catch block getting system.outofmemoryexception
  • #643109
    Hi,

    Rmove the first error "An invalid VARIANT was detected during a conversion from an unmanaged VARIANT to a managed object. Passing invalid VARIANTs to the CLR can cause unexpected exceptions, corruption or data loss."

    Just follw below step.
    -->Open your project
    --> go to Debug menu and select Exceptions
    --> expand Managed Debugging Assistants
    --> Locate InvalidVariant MDA and UNCHECK that option.

    Try to run you application and see if you are still getting this error or not.


    Regards,
    Asheej T K


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.