Knowledge Base - Technical Articles

Technical Article   Error:  Error opening feature class. Number of shapes does not match the number of table records

Article ID: 26840
Software:  ArcGIS - ArcEditor 9.0, 9.1, 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcInfo 9.0, 9.1, 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcView 9.0, 9.1, 9.2, 9.3, 9.3.1, 10
Platforms: N/A

Error Message

Accessing or viewing a shapefile in ArcMap or ArcCatalog returns the error:

"Error opening feature class
Number of shapes does not match the number of table records"


There is a mismatch between the number of features and the number of records in the DBF file.

This can be caused by editing the shapefile DBF table in Microsoft Excel.

This can also be caused by an ArcMap crash while the shapefile is being edited.

Solution or Workaround

The options listed below may fix the problem.

 Please be aware that third-party scripts and extensions are unsupported by Esri. It is highly recommended that a backup copy of the shapefile be created before running the damaged shapefile through either of these utilities.

  • Use the 'ShapeFile Repairer' utility available on ArcScripts to fix the mismatch. A link is provided in the Related Information section below.

     For the ShapeFile Repairer Utility to work correctly, ensure the language setting of the computer matches the language used to create the shapefile.

  • Use the 'Shapefile Repair Tool' by Jerry Workman. A link is provided in the Related Information section below.
  • Use ArcInfo Workstation to convert the shapefile to a coverage and back to a new shapefile using the following command sequence.

     This option is only available with the ArcGIS ArcInfo license with ArcInfo Workstation installed!

    Arc: precision double double

    Arc: usage shapearc
    Usage: SHAPEARC <in_shape_file> <out_cover> {out_subclass}

    Arc: shapearc sample.shp tempcov <subclass for line or polygon shapefile>

    Arc: build tempcov <point, line, poly>

    Arc: usage arcshape
    Usage: ARCSHAPE <in_cover> <in_feature_class> <out_shape_file>

    Arc: arcshape tempcov <point, line, poly> newshape.shp

Related Information

Created: 5/26/2004
Last Modified: 1/28/2015

If you would like to post a comment, please login


By Anonymous - 11/03/2004 9:00 AM

This is of limited utility. 1) I find that Andrew Williams "shapefile repairer" doesn't work for most shapefiles (for some reason). 2) If you don't have AI, your out of luck. Furthermore, the AI solution doesn't work on 3D files. 3) FWIW, I found that the OGR2OGR utility in gdal does work pretty well. It might be worth adding this to the article as a solution.