Hi,
I am trying to query a large Dynamics CRM 2015 table using late binding. Here is a code snippet:
IQueryable<Entity> LinqRecs = Context.CreateQuery("contact");
foreach(Entity e in LinqRecs)
{
Debug.WriteLine(e["ID"]);
}
When I try to iterate through the results, I get the following error:
An unhandled exception of type 'System.InsufficientMemoryException' occurred in Microsoft.Xrm.Sdk.dll
Additional information: Failed to allocate a managed memory buffer of 536870912 bytes. The amount of available memory may be low.
I have quite a bit of RAM in my PC, why am I getting this error?
Is there a way to query the table in sections instead?
I tried using RetrieveMultiple method instead but I got a similar error.
Thanks,
Scott Kay
Scotty@Simple2Me.com