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.

  • Likely an OGR issue, not a qgis one. Aug 16 '12 at 10:34

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.

  • I tried opening what was left in Excel and Open Office, the file was toast. Saving after every column entry sounds reasonable. So the .shp file's .dbf is not altered (the table is in memory) until is is saved? Seems some operations work on the original file whether one saves or not, otherwise a save is required. Is that correct?
    – HealthMaps
    Aug 16 '12 at 20:23
  • All your edits on geometry and attribute table remain in memory until you press the Save Button. So if you made a mistake, you can always leave without saving.
    – AndreJ
    Aug 17 '12 at 5:07
  • You are definitely correct to recommend saving after each edit. However there seems to be some bugs in the table calculation capability or I am still green enough that I do not understand how it really works. Some of both I think. As of now, I do not see the value of the default to integer arithmetic needing to multiply by 1.0 to get floating point results. No other software I use works this way.
    – HealthMaps
    Aug 18 '12 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.