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

foolfish xjimmyshcn at sohu.com
Tue Jun 10 02:05:33 EDT 2008


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: http://www.nabble.com/in-fusion%2Cafter-select-features-at-server%2C-i-cann%27t-do-delete-operation%21-tp17748358p17748358.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20080609/d2cbf319/attachment.html


More information about the mapguide-users mailing list