ThinkGeo.com    |     Documentation    |     Premium Support

File access error

I'm trying to edit a shapefilefeaturelayer just for change a column value of some features but I get an IOException everytime I try.


I add the shapefile as a dynamicoverlay and I'm sure that the layer is editable but I don't know why it doesn't work. If anybody has any Idea... Thank you all!!


Here is the source code, and it fails with the commitTransaction method


Dim dictionary As New Dictionary(Of String, String)

dictionary.Add("Ocupancy", 0)


For Each Feat As Feature In coleccionAreas

   capa.Open()

   capa.EditTools.BeginTransaction()

   capa.EditTools.Update(Feat.GetShape, diccionario)

   capa.EditTools.CommitTransaction()

   capa.Close()

Next



Tiffany, 
  
 Make sure you are using the ReadWrite mode when creating a shape file layer. 
  
 Dim layer As New ShapeFileFeatureLayer(“C:\STATES.SHP”, ShapeFileReadWriteMode.ReadWrite) 
  
 We will improve the Exception Message so you can easily know what’s going on. 
  
 Ben.