Message 1 of 3
acmaplayer.forcerefresh() dont work
Not applicable
09-06-2018
06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi! I have some code thats working with inserting, updating and deleting features.
Issue is when I do smth with my features( i.e modificate geometry or create new feature) I have an error when string
"layer.forceRefresh()" passed.
My project layer crashed with message "gws cache feauture storage already exists" but my features which I insert appears in oracle database, but features which I update dont update in oracle database. Any suggestions how to fix it?
Dim layer As AcMapLayer = GetLayerByName("DEA_GEOM_SPATIAL")
Dim classaname As String = layer.GetFeatureClassName()
batchCollection.Clear()
commands.Clear()
batchCollection = layer.GetIdsOfEditSetFeatures()
Dim updateQuery As String = ClassSystemProperties.FeatureStatus & " = " & ClassSystemProperties.FeatureStatusModified
Dim strFeatureClassName = layer.GetFeatureClassName()
If batchCollection.Count > 0 Then
For Each item In batchCollection
Dim upd As New MgUpdateFeatures(strFeatureClassName, item, updateQuery)
commands.Add(upd)
Dim ins As New MgInsertFeatures(strFeatureClassName, item)
commands.Add(ins)
Next
DeleteMethod(deleteQuery)
InsertMethod(insertQuery,commands)
UpdateMethod(updateQuery,commands)
layer.ForceRefresh()
'layer crashed after this string with message "gws cache features storage already exist"