# File access error

**URL:** <https://community.thinkgeo.com/t/file-access-error/131>\
**Category:** WinForms\
**Created:** [December 5, 2008, 3:37am UTC](https://community.thinkgeo.com/t/file-access-error/131 "2008-12-05T03:37:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TiffanyJohannsdottir](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/41988e/32.png) [@TiffanyJohannsdottir](https://community.thinkgeo.com/u/TiffanyJohannsdottir)\
**Post date:** [December 5, 2008, 3:37am UTC](https://community.thinkgeo.com/t/file-access-error/131/1 "2008-12-05T03:37:31Z")

</div>

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

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

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

Dim&nbsp;dictionary&nbsp;As&nbsp;New&nbsp;Dictionary(Of&nbsp;String,&nbsp;String)  
  
dictionary.Add("Ocupancy",&nbsp;0)

For&nbsp;Each&nbsp;Feat&nbsp;As&nbsp;Feature&nbsp;In&nbsp;coleccionAreas  
  
&nbsp;&nbsp;&nbsp;capa.Open()  
  
&nbsp;&nbsp;&nbsp;capa.EditTools.BeginTransaction()  
  
&nbsp;&nbsp;&nbsp;capa.EditTools.Update(Feat.GetShape,&nbsp;diccionario)  
  
&nbsp;&nbsp;&nbsp;capa.EditTools.CommitTransaction()  
  
&nbsp;&nbsp;&nbsp;capa.Close()  
  
Next

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [December 7, 2008, 8:46pm UTC](https://community.thinkgeo.com/t/file-access-error/131/2 "2008-12-07T20:46:54Z")

</div>

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