mzdijjw2

FeatureCursor cannot open any more tables in parallel loop

Discussion created by mzdijjw2 on Sep 28, 2013
Latest reply on Oct 2, 2013 by belowzero8
Hi all,

I am using VB 2010 to make ArcGIS 10.0 Add-Ins. I always use:

newFeatCursor = Nothing
GC.Collect()


or

System.Runtime.InteropServices.Marshal.ReleaseComObject(newFeatCursor)
GC.Collect()


everytime I use featureCursor to insert features, or others. That piece of code keeps me away from an error that states: "Cannot open any more tables."

Now I have hundred thousands of features to insert. When I use normal loop ( for loop) it works perfectly. Then I want to change those calculations followed by the feature insertion paralleled. I use Parallel.For in VB 2010. And the problem comes when the error: "Cannot open any more tables." keeps coming and coming even though I use:

newFeatCursor = Nothing
GC.Collect()


or

System.Runtime.InteropServices.Marshal.ReleaseComObject(newFeatCursor)
GC.Collect()
.

Any help to make the feature insertion in parallel processing successful will be much appreciated.


Thank you.

Outcomes