Announcements
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
I have never used eConnect to extract data but my buddy Mariano Gomez has.
Perhaps this will help.
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
eConnect is used to write data into GP not extract data. Exactly what data are you trying to extract?
Can anyone help here? Need to resolve the issue asap.
Thanks and Regards
Venkat
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156