Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
Likely an OGR issue, not a qgis one. –  Giovanni Manghi Aug 16 '12 at 10:34

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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