Hello I'm trying to work with spatialite files. I saved a shp file as a new spatialite file. It works. I made a new spatialite connection to the sqlitefile. Then with dbmanager I added a text field. When I load the vector layer to Qgis (drag and drop don't work) that field don't appear in table view. If in Qgis I try to edit the layer and add a second field (text) the field is created and I can edit it. If I try to save edits I get an error, something like:
Could not commit changes to layer test Errors: SUCCESS: 1 attribute(s) added. ERROR: the count of fields is incorrect after addition/removal of fields! The edit is saved and the previous (dbmanager-added one) field appears... If I close qgis and try to load the test layer again both fields (the one created in dbmanager and the qgis added one) don't appear: Then again if I try to add a field and enter data/save the same error and the two fields appear, and so on.. Same thing happens if I load data from postgis to sqlite trough dbmanager insted of data imported from shp file.. If I try to create a new spatialite layer with qgis and then add a new field, that field is created and I can edit it. If then in dbmanager I try to add a second field it don't appear when the layer is loaded into qgis.. Strange thing, dbmanager recognizes all fields.. Another strange thing, text fields coming from original shape file, in qgis under layer properties, are seen as generic TEXT fields, in dbmanager they are VARCHAR(lenght). Into a field that was VARCHAR(lenght) in shapefile can be inserted and saved a long text entry. Is there something wrong with my sqlite management or is this a bug? Thanks Pietro -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Qgis-2-0-1-and-Spaitialite-fields-creation-edit-problems-tp5092901.html Sent from the Quantum GIS - User mailing list archive at Nabble.com. _______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
