iFeature.FindRow causes "Cannot change that row" error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have this snippet of code which finds the next suitable row for an iFeature and it works about 20% of the time. However, more often than not, I get the error:
"System.ArgumentException: iFeature.FindRow("iFeatureName"): Cannot change the row." on row 3
(I've changed the name of the iFeature here to generic due to work IP)
Below is the snippet of code which is causing the headache.
Logger.Warn("Starting base member check")
Try
i = iFeature.FindRow("iFeatureName", "b1", "=", BASE_ANGLE_A, "b2", "=", BASE_ANGLE_A, "t", ">=", BASE_ANGLE_t - 0.5)
Logger.Warn("Currently Selected row " & i)
Catch ex As Exception
Logger.Error("Error is: " & ex.ToString)
Exit Sub
End Try
Try
iFeature.ChangeRow("iFeatureName", i)
Catch ex As Exception
Logger.Warn("Struggling to change to the selected row")
Logger.Error("Error is: " & ex.ToString)
End Try
the double try was just to identify where the error was occurring, which happened to be assigning when "i"
I'm really struggling here as I'm only trying to read the row using
i = iFeature.FindRow("iFeatureName",...........
and I'm getting a change row error. Am I accidentally modifying the iFeature with this one or accessing it incorrectly?
Again, it definitely has worked before but is inconsistent.
Any feedback is greatly appreciated