Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Need to extract data in Batches using eConnectOut.

(0) ShareShare
ReportReport
Posted on by 265

Hi,

We are trying to extract data from GreatPlains using eConnect. We are getting the following error when we try to extract large volume of data.

"Failed to allocate a managed memory buffer of 536870912 bytes. The amount of available memory may be low.". So we assume that this issue due to volume of records. So we are trying to implement batching in our extraction. That is getting the  records in batches. It will be helpful if we can get answers for the following.

1) How to resove this "Failed to allocate a managed memory buffer of 536870912 bytes. The amount of available memory may be low." error.

2) How to get the record in batches (100 by 100 or 1000 by 1000).

Any help highly appreciated.

Thanks and Regards

Venkatesan

Categories:
  • Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Need to extract data in Batches using eConnectOut.

    I have never used eConnect to extract data but my buddy Mariano Gomez has.

    Perhaps this will help.

    community.dynamics.com/.../extracting-data-from-microsoft-dynamics-gp-company-databases-using-sql-server-for-xml-and-xmlnamespaces

  • venkateshmpr Profile Picture
    265 on at
    RE: Need to extract data in Batches using eConnectOut.

    Thanks for you replay Richard, Using eConnect we can extract data too. We are trying to extract Sales Transactions. Below is the sample code we used to extract the data.

               eConnectType myEConnectType = new eConnectType();

               RQeConnectOutType myReqType = new RQeConnectOutType();

               eConnectOut myeConnectOut = new eConnectOut();

               myeConnectOut.ACTION = 1;

               myeConnectOut.DOCTYPE = "Sales_Transaction";

               myeConnectOut.OUTPUTTYPE = 2;

               myeConnectOut.FORLIST = 1;

               if (!string.IsNullOrEmpty(filter))

                   myeConnectOut.WhereClause = filter;

               myReqType.eConnectOut = myeConnectOut;

               RQeConnectOutType[] myReqOutType = { myReqType };

               myEConnectType.RQeConnectOutType = myReqOutType;

               MemoryStream myMemStream = new MemoryStream();

               XmlSerializer mySerializer = new XmlSerializer(myEConnectType.GetType());

               mySerializer.Serialize(myMemStream, myEConnectType);

               myMemStream.Position = 0;

               XmlTextReader xmlreader = new XmlTextReader(myMemStream);

               string xmldoc = string.Empty;

               while (xmlreader.Read())

               {

                   xmldoc = xmldoc + xmlreader.ReadOuterXml();

               }

               myMemStream.Close();

               eConnectMethods requester = new eConnectMethods();

               string reqDoc = requester.eConnect_Requester(connString, EnumTypes.ConnectionStringType.SqlClient, xmldoc);

    Thanks and Regards

    Venkatesan

  • Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Need to extract data in Batches using eConnectOut.

    eConnect is used to write data into GP not extract data. Exactly what data are you trying to extract?

  • venkateshmpr Profile Picture
    265 on at
    RE: Need to extract data in Batches using eConnectOut.

    Can anyone help here? Need to resolve the issue asap.

    Thanks and Regards

    Venkat

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 601 Most Valuable Professional

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 416

#3
Adis Profile Picture

Adis 384 Super User 2025 Season 1

Product updates

Dynamics 365 release plans