Hi, try closing the featureReader selection before attempting the delete
z On Tue, Jun 10, 2008 at 4:05 PM, foolfish <[EMAIL PROTECTED]> wrote: > ENV: mapguide opensource 2.0.1 + mapguide studio 2009 + visual studio > 2005(c#) i want to delete the features in a layer ,i use the follow lines: > MgDeleteFeatures deleteCmd = new MgDeleteFeatures(featureName, "KEY >= 0"); > MgFeatureCommandCollection commands = new MgFeatureCommandCollection(); > commands.Add(deleteCmd); featureService.UpdateFeatures(dataSourceId, > commands, false); but it throw an exception: "Please try your operation > later as the resource was busy: > Session:287d258c-0000-1000-8000-005056c00001_zh_7F0000010AFC0AFB0AFA//Line.FeatureSource" > before i do the delete command with UpdateFeatures(),i do a selection > operation: ... MgResourceIdentifier resId = new > MgResourceIdentifier(layer.GetFeatureSourceId()); MgFeatureQueryOptions > queryOption = new MgFeatureQueryOptions(); > queryOption.SetFilter(queryString); MgFeatureReader featureReader = > featureService.SelectFeatures(resId, queryLayer, queryOption); MgSelection > selection = new MgSelection(map); selection.AddFeatures(layer, > featureReader, 0); selectionXML = selection.ToXml(); > selection.Save(resService, map_name); > ----------------------------------------------------------------------------------------- > my question is how to clear selection or disselect at server ,before i > delete the features??? > ________________________________ > View this message in context: in fusion,after select features at server, i > cann't do delete operation! > Sent from the MapGuide Users mailing list archive at Nabble.com. > > _______________________________________________ > mapguide-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapguide-users > > -- Zac Spitzer - http://zacster.blogspot.com (My Blog) +61 405 847 168 _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
