web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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:
I have the same question (0)
  • venkateshmpr Profile Picture
    265 on at

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

    Thanks and Regards

    Venkat

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    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

    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,852 Moderator on at

    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

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 461 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 428

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans