[mapguide-users] in fusion, after select features at server, i cann't do delete operation!

foolfish xjimmyshcn at sohu.com
Tue Jun 10 05:48:42 EDT 2008


it's ok,thank you~




zspitzer wrote:
> 
> Hi,
> 
> try closing the featureReader selection before attempting the delete
> 
> z
> 
> On Tue, Jun 10, 2008 at 4:05 PM, foolfish <xjimmyshcn at sohu.com> 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
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
> 
> 
> 
> -- 
> Zac Spitzer -
> http://zacster.blogspot.com (My Blog)
> +61 405 847 168
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/in-fusion%2Cafter-select-features-at-server%2C-i-cann%27t-do-delete-operation%21-tp17748358p17751586.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list