2

I have a Spatialite DB which I have imported some shp files too using Spatialite-Gui. I have full read-write access to these layers via the Spatialite-Gui, however when I open these layers from QGIS I only have read access. I am able to successfully insert a new table column using the QGIS editor, but cannot modify any rows.

I have read the documentation on the Sqlite page and it seems that something is holding a Reserved lock on the table. I have tried disconnecting Spatialite-Gui from the DB but the lock still remains.

This problem only occurs with DBs that have been created with Spatialite-Gui. Spatialite DBs originally created in QGIS retains read-write access in both QGIS or Spatialite-Gui. I do notice that the Spatialite DBs created in Qgis are in Spatialite 3.0 could this be the problem?

I am using QGIS 1.8, Spatialite 4.0, and Spatialite-Gui 1.6

1 Answer 1

3

QGIS 1.8 does not (and probably will not) support databases created with Spatialite 4.0. It requires rebuilding QGIS and setting the SPATIALITE flag to the 4.0 library which you must have already installed. And all the developers and packagers are focusing in the coming QGIS 2.0 rather than rebuilding 1.8. I believe that this next release of QGIS will use GDAL 1.10 which should have built in support for Spatialite, with the newer library. So your options are:

  1. Rebuild QGIS and set the compile option to point to a local copy of SL 4.0
  2. Use the spatialite tool spatialite_convert to revert your 4.0 database back to version 3.0 format
  3. Wait for the next QGIS release.

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.