
I am using eConnect to get Item data. The call is pretty basic, and looks like this:
using (var e = new eConnectMethods())
{
ret.LoadXml(e.GetEntity(_connectionString, eConnect_Request_XML));
e.Dispose();
}
The eConnect_Request_XML looks like this:
<eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">
<RQeConnectOutType>
<eConnectProcessInfo>
<Outgoing>TRUE</Outgoing>
<MessageID>Item</MessageID>
</eConnectProcessInfo>
<eConnectOut>
<DOCTYPE>Item</DOCTYPE>
<OUTPUTTYPE>2</OUTPUTTYPE>
<FORLOAD>0</FORLOAD>
<FORLIST>1</FORLIST>
<ACTION>0</ACTION>
<ROWCOUNT>0</ROWCOUNT>
<REMOVE>0</REMOVE>
</eConnectOut>
</RQeConnectOutType>
</eConnect>
Because there are close to 18,000 items, this call times out and throws an OutOfMemory Exception, which also causes eConnect to max out on memory and not release it.
My question is how can I get all items, using eConnect, in batches? I'm aware of the index to and index from property, but not sure how to implement it in a looping fashion.
Thanks in advance!
*This post is locked for comments
I have the same question (0)I'm using this call to get the first 5 items
<eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">
<RQeConnectOutType>
<eConnectProcessInfo>
<Outgoing>TRUE</Outgoing>
<MessageID>Item</MessageID>
</eConnectProcessInfo>
<eConnectOut>
<DOCTYPE>Item</DOCTYPE>
<OUTPUTTYPE>2</OUTPUTTYPE>
<FORLOAD>0</FORLOAD>
<FORLIST>1</FORLIST>
<ACTION>0</ACTION>
<ROWCOUNT>5</ROWCOUNT>
<REMOVE>0</REMOVE>
</eConnectOut>
</RQeConnectOutType>
</eConnect>
Then I'm trying to take the last item number and use the following XML to get the next 5 but it returns an empty set. 009990000020 is a valid itemnumber that was returned from the data.
<eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">
<RQeConnectOutType>
<eConnectProcessInfo>
<Outgoing>TRUE</Outgoing>
<MessageID>Item</MessageID>
</eConnectProcessInfo>
<eConnectOut>
<DOCTYPE>Item</DOCTYPE>
<OUTPUTTYPE>2</OUTPUTTYPE>
<INDEX1FROM>009990000020</INDEX1FROM>
<FORLOAD>0</FORLOAD>
<FORLIST>1</FORLIST>
<ACTION>0</ACTION>
<ROWCOUNT>5</ROWCOUNT>
<REMOVE>0</REMOVE>
</eConnectOut>
</RQeConnectOutType>
</eConnect>
What is frustrating is that if I use the following XML, I get the first 5 items again
<eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">
<RQeConnectOutType>
<eConnectProcessInfo>
<Outgoing>TRUE</Outgoing>
<MessageID>Item</MessageID>
</eConnectProcessInfo>
<eConnectOut>
<DOCTYPE>Item</DOCTYPE>
<OUTPUTTYPE>2</OUTPUTTYPE>
<INDEX1TO>009990000020</INDEX1TO>
<FORLOAD>0</FORLOAD>
<FORLIST>1</FORLIST>
<ACTION>0</ACTION>
<ROWCOUNT>5</ROWCOUNT>
<REMOVE>0</REMOVE>
</eConnectOut>
</RQeConnectOutType>
</eConnect>