[Gdal-dev] .dbf file getting deleted
vdharan nadra
vdharan2001 at gmail.com
Wed Mar 14 02:50:57 EDT 2007
HI,
I want to delete features from a shape file. When i try repack after
deleting the features, the .dbf file it self is getting deleted.
When i trace down the repack function, i could find that in
ogrshapelayer.cpp VSIRename(.....) returns OGRERR_FAILURE.
/* -------------------------------------------------------------------- */
/* Cleanup the old .dbf and rename the new one. */
/* -------------------------------------------------------------------- */
DBFClose( hDBF );
hDBF = hNewDBF;
VSIUnlink( CPLResetExtension( pszFullName, "dbf" ) );
if( VSIRename( oTempFile, CPLResetExtension( pszFullName, "dbf" ) ) != 0
)
return OGRERR_FAILURE;
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Iam calling the delete feature and repack as follows
.....
poLayer->DeleteFeature(iField)
poDS->ExecuteSQL("REPACK myshapefile", NULL, NULL);
......
Please suggest me some solution.
Best Regards,
N.Vidhiyadharan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070314/9ad72a4f/attachment.html
More information about the Gdal-dev
mailing list