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've been trying to create a new spatialite database within QGIS 1.8 (SpatiaLite Version 3.0.1; QSpatialite 6.0.3) and keep getting this error: "The SQL query seems to be invalid. no such table: views_geometry_columns" and then "This DataBase seems to be a valid SQLite DataBase but not a valid SpatiaLite One, Would you like QSpatiaLite to automatically transform it to SpatiaLite (information won't be lost) ?" and after "Yes" comes "Unable to convert Database to SpatiaLite".

What am I doing wrong? There was no problems with old version (QGIS 1.7.4 and QSpatialite 5.0.3).

Please advise regarding creating a new Spatialite database.

Thank You!


Spatialite-gui did the trick. You just have to have right SRID. Here is the SRID list http://drupalcode.org/project/geo.git/blob/ee3f75649e4b01dfd27d8e35b222a2b51c93d706:/srid.inc

Thank you all for your effort and time!

share|improve this question
3  
Can you explain the steps you are taking to get this error message? –  Stev_k Aug 23 '12 at 21:59
    
You get this error, if you save a layer with "Save as...". Best way is Layer-> Add new Layer -> New spatialite layer, and then the three points to create a new database. –  Andre Joost Aug 24 '12 at 4:19
    
0down vote accept Spatialite-gui did the trick. You just have to have right SRID. Here is the SRID list drupalcode.org/project/geo.git/blob/… Thank you all for your effort and time! –  Jonny Aug 24 '12 at 19:03
    
@Jonny Please accept an answer so this thread is marked as closed. –  underdark Aug 25 '12 at 8:47
    
I have spatialite 2.0.1, qgis 1.8.0 and qspatialite 6.0.7 and I still have the problem. Somebody knows a solution to fixe the bug ? –  user16214 Mar 15 '13 at 13:47
add comment

3 Answers 3

Qspatialite is incompatible with spatialite 3 (see http://code.google.com/p/qspatialite/issues/detail?id=6) and AFAIK DB Manager is incompatible too. Use spatialite-gui (https://www.gaia-gis.it/fossil/spatialite_gui/index) to manage your database and ogr2ogr to add or export layers. Or install spatialite 2.x.

share|improve this answer
add comment

This is a known bug. Now fixed in QSpatiaLite v 6.0.6

RIVIERE Romain QSpatiaLite Developer

share|improve this answer
add comment

I think there are problems with QSpatialite and more recent versions of QGIS. If you have spatialite-gui this is good for creating Spatialite DBs and populating them. You could try running "spatialite_gui" from a terminal (without the quotation marks) to see if you have it installed. I can't remember if my spatialite-gui came with QGIS or whether I installed it separately, sorry.

share|improve this answer
1  
spatialite-gui is available here. Agreed - I find it much much easier to work with than the QGIS interface to spatialite. –  Simbamangu Aug 24 '12 at 15:28
add comment

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.