[gdal-dev] Update existing shape file
mateusz at loskot.net
Fri Aug 1 10:18:46 EDT 2008
> I wanna set new field value to an existing shape file which has been
> opened with update access, but it doesn't work, my code like this:
> OGRFeature* pFeature = pLayer->GetFeature(2);
> int nIdx = pFeature->GetFieldIndex("Name");
> pFeature->SetField( "Name", "hanJ reiver" );
> Anyone give me some advices?
You need to call OGRLayer::SyncToDisk method
to get data update flushed to file on disk.
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
More information about the gdal-dev