This project has moved and is read-only. For the latest updates, please go here.

Invalid DataRow requested at index 1246

Topics: General Topics, SharpMap v0.9 / v1.x
Feb 24, 2009 at 10:16 PM
I got this exception "Invalid DataRow requested at index 1246".

I saw the source code , this is because oid>=_NumberOfRecords.

before this runing I remove some polygon in the shapemap file. how can I fix this bug?
Feb 25, 2009 at 5:23 PM
could you post some code? In shapefiles when a record is removed all subsequent records are moved down, and since the index is the id, the id changes hth jd
Feb 25, 2009 at 5:45 PM
ok,I fixed it by re-draw a map.
the code is correct.
after remove the polygon, the object id (oid) were still in there.
I drop the shapefile and re-draw it. so everything was ok.