[GIS] Could not commit changes to layer X

attribute-tableqgis

I am editing a layer's (Z) attribute table. I made some columns, used the field calculator to fill them up, made some more, went back and deleted some and then tried to save the edits and got the error message: "Could not commit changes to layer Z. Errors: ERROR: 3 attributes not deleted. Success 2 attributes added Success: 10 attribute values changed" Then I closed the error box and the layer remains in edit mode and one can't save it. I tried to save the Z layer and got the same "Could not …" but also with "OGR error deleting field 3: Invalid field address"
I saved the project and then reloaded the project to find that all the columns in layer Z had been wiped out except an ID layer. The layer Z is ruined. v 1.8.0.
What is going on? – thanks.

Best Answer

You should save your data after each creation or deletion of fields. For the broken layer, you can try to open the .dbf file with OpenOffice Calc.