[mapguide-users] Cannot Create any more connections to FDO
provider
Gyufi
endre.budai at geoview.hu
Mon Jun 29 10:58:09 EDT 2009
Hi,
Please try like this
_resourceIdentifier = new MgResourceIdentifier(lay.GetFeatureSourceId)
fr = featureService.SelectFeatures( _resourceIdentifier,
lay.GetFeatureClassName, queryOpt)
propertyCollection = CreateMultiPolygon(fr, lay.GetFeatureGeometryName)
_resourceIdentifier.Dispose()
Mark Pendergraft wrote:
>
> Okay,
>
>
>
> I have a feature source, which contains quarters of sections.. I have
> written a program to create multipolygons of the quarter polygons and
> add the data from the individual polygons.
>
>
>
> It works fine, except when I set it to iterate through the entire set.
> Inside a loop I set the feature reader to the selection
>
> Get the features, run a function to convert them to a multipolygon
>
> Then dispose of the featureReader, then change my filter, then repeat
> the loop
>
>
>
> I get through about 40 iterations before I crash and get the message
> "Cannot Create any more Connections to OSGeo.SDF FDO provider"
>
>
>
>
>
> My question is.... What is creating the FDO connection? I thought it
> was when I create the FeatureReader... but since I'm closing and
> disposing each time, I'm no longer sure. What can I do in order to make
> my site loop through several thousand iterations (many of which will be
> empty) read the resulting features and write them to new features?
>
>
>
> My loop looks like this:
>
>
>
> Do While rngI < 3
>
>
>
>
>
> filter = IncrementSecTwnRng(secI, twnI, rngI)
>
>
>
> queryOpt.SetFilter(filter)
>
> fr = featureService.SelectFeatures(New
> MgResourceIdentifier(lay.GetFeatureSourceId), lay.GetFeatureClassName,
> queryOpt)
>
>
>
> propertyCollection = CreateMultiPolygon(fr,
> lay.GetFeatureGeometryName)
>
>
>
> If Not propertyCollection Is Nothing Then
>
> batchPropertyCollection.Add(propertyCollection)
>
>
>
> End If
>
>
>
> fr.Close()
>
> fr.Dispose()
>
>
>
>
>
> Loop
>
>
>
> Thanks for the help!
>
>
>
> -Mark Pendergraft
>
>
>
>
>
> Ph: (425) 486-1252 Fx: (425) 486-6108 www.meadgilman.com
> <http://www.meadgilman.com/>
>
>
>
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
--
View this message in context: http://n2.nabble.com/Cannot-Create-any-more-connections-to-FDO-provider-tp1814108p3174887.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list