[mapguide-users] MGOS 2.0: MgUpdateFeatures broken
andrea tiveron (e-metodi)
andrea.tiveron at e-metodi.it
Sat Jan 30 12:01:25 EST 2010
did you remember this problem?
that is my code
the update work fine only the first time
thanks for the help
Dim realPath As String =
Dim configPath As String = realPath + "webconfig.ini"
Dim userInfo As New MgUserInformation("Markup", "Markup")
Dim siteConnection As New MgSiteConnection()
Dim resourceService As MgResourceService =
Dim featureService As MgFeatureService =
Dim dataSource As String = "Library://e-facility/SUAA/" +
namePlan + "/Markup/Data/" + nameLayer + ".FeatureSource"
Dim featureSourceId As MgResourceIdentifier = New
Dim featureSourceExists As Boolean =
If featureSourceExists = False Then
style=""text-align:justify""><b>Attenzione!</b><br />Non trovato!</div>" &
Response.Write("</script>" & vbCrLf)
Dim className As String = "ambienti"
Dim filterText As String = "Key = '" + Trim(CStr(IDSpazio)) +
Dim queryOption As MgFeatureQueryOptions = New
Dim propColl As MgPropertyCollection = New
Dim str As MgStringProperty = New MgStringProperty("Name",
Dim updateFeatures2 As MgUpdateFeatures = New
MgUpdateFeatures(className, propColl, filterText)
Dim commands2 As MgFeatureCommandCollection = New
'Commit the update
Dim featureReader =
featureService.SelectFeatures(featureSourceId, className, queryOption)
featureService.UpdateFeatures(featureSourceId, commands2, False)
featureReader = featureService.SelectFeatures(featureSourceId,
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of gregboone
Sent: venerdì 4 aprile 2008 16.29
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] MGOS 2.0: MgUpdateFeatures broken
I have another recommendation. You should make a call to
FdoIFeatureReader->Dispose() after the call to Close() so that the garbage
collection can happen immediately and all allocated SQLite resources freed.
Maksim Sestic wrote:
> Hi Ismael,
> In case you're using managed wrapper, you may consider reading following
> thread on FDO wiki:
> including related Ticket:
> Maksim Sestic
> Ismael Cams wrote:
>> You are right. It was indeed a FeatureReader problem. I was closing it,
>> but only after having done the update. Somehow it did not give problems
>> in MGOS 1.2.
>> I have moved the close() before the deletion/update of the feature and it
>> is working fine now.
>> Thanks for the help.
>> zspitzer wrote:
>>> if your refering to the thread 'Please try your operation later as the
>>> resource was busy' from Adam
>>> it was indeed a feature reader problem
>>> On Fri, Apr 4, 2008 at 5:45 PM, Ismael Cams <mapguide2007 at gmail.com>
>>>> The featurereader is closed. The identical code is behaving correct on
>>>> There is a parallel thread on the forum at the moment which is
>>>> the same problem withe updating and deleting features. Might be a bug
>>>> changed behaviour ?
>>>> did you open a feature reader and not close it?
>>>> View this message in context:
>>>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>>> mapguide-users mailing list
>>>> mapguide-users at lists.osgeo.org
>>> Zac Spitzer -
>>> http://zacster.blogspot.com (My Blog)
>>> +61 405 847 168
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
View this message in context:
Sent from the MapGuide Users mailing list archive at Nabble.com.
mapguide-users mailing list
mapguide-users at lists.osgeo.org
More information about the mapguide-users