This project has moved. For the latest updates, please go here.

Updating row with Sharpmap 2.0; Should this work?

May 5, 2009 at 6:49 PM
ShapeFileProvider sf = null;

sf = new ShapeFileProvider(filePath);
if (!sf.IsOpen)

FeatureDataSet ds = new FeatureDataSet();
BoundingBox bbox = sf.GetExtents();

sf.ExecuteIntersectionQuery(bbox, ds);

DataTable table = ds.Tables[0];

for (int i = 0; i < table.Rows.Count; i++)
    DataRow dr = table.Rows[i];
    for (int j = 0; j < table.Columns.Count; j++)
        DataColumn dc = table.Columns[j];
        if(dr[j].ToString() == "Syracuse")
            dr[j] = "Syracusa";  // I place a break here assuming that it will only occur once.  But it keeps breaking.

May 6, 2009 at 9:28 AM
Hi poepoe12002, unfortunately this is not v2 code and will not update the shapefile. The real v2 is from . We were trying to import the code back into codeplex a while ago while maintaining the version history but hit issues so the v2 code here is very very old. hth jd
May 6, 2009 at 3:58 PM
Thanks, John.

Am I using the V2 Beta? 

I went to the googlecode site and could not figure out how to get the code. 
I tried to use subversion: sharpmapv2-read-only
Said it dosent exist.  Direction would be appreciated.
May 6, 2009 at 4:03 PM
I stand corrected.  I am downloading it as I write. 

Re: V2 vs V2 Beta.  Are the changes describes anywhere?
May 6, 2009 at 4:04 PM
Edited May 6, 2009 at 4:07 PM
Hi poepoe12002,
have a look at this Wiki page.
This only helps with getting source though, which you already solved :-).

May 6, 2009 at 4:08 PM
hi poepoe12002 remove the 'sharpmapv2-readonly' part. it should be just hth jd