Hi Ricardo, Thanks for explaining these things.
The default of Spatialite uses "Geometry" and "PK_UID" as you can see test-2.3.sqlite. All spatialite databases immigrated using the utilities of spatialite have "Geometry" and "PK_UID" as default. You can also see it in the Spatialite Tutorials. http://www.gaia-gis.it/spatialite/spatialite-tutorial-2.3.1.html#t1 As suggestion, if you don't mind, probably you can change the default to "Geometry" and "PK_UID" to avoid confusion especially for the new users. However, you also put a checkbox option if you like. I think it would be nice to some documentation in plugin. e.g. PRAGMA TABLE_INFO(table_name) to view table before you start using the plugin. The probably a link to this Spatialite Tutorials (i.e. http://www.gaia-gis.it/spatialite/spatialite-tutorial-2.3.1.html#t1 ). Thanks. Noli On 12/17/10, Ricardo Filipe Soares Garcia da <ricardo.garcia.si...@gmail.com> wrote: > Hi Noli, Guiseppe, all > > I downloaded the spatialite sample database and ran your query. > I could run it fine without the errors you mention. The problem here > seems to be that I still need to write some documentation on how to > use the plugin so that you (the user) can know how to operate it > correctly ;) > > I will improve the Help page of the plugin in order to clarify these issues. > > As for your specific problem: > > the SQL query you are using is: > > Select * from Regions where NAME = 'VENETO' > > - If you only intend to visualize the results in the 'result' tab of > the plugin, without loading to map canvas, it works fine just like > this. > > - BUT, If you want to load the result of the query to the map canvas, > you must ensure that the 'Geometry column' and 'Identifier column' > text boxes are showing the correct values for your specific tables. > Using a spatialite db, I've set the default values for these text > boxes as 'geometry' and 'pkuid', but you need to confirm if your data > are using these names as well. In this case, the correct values should > be 'Geometry' and 'PK_UID'. > You can check the names of the columns in an sqlite table by using the > spatialite manager, or by running the following query: > > PRAGMA TABLE_INFO(table_name) > > If you use the wrong geometry and identifier values you may (or may > not) still be able to visualize your data over the map canvas but the > attribute values will come as ERROR. > > > As for the deletion of tables from the spatialite db, there isn't a > nice way of doing this. To the best of my knowledge you still have to > manually create the SQL DROP TABLE... statement and also remove the > triggers and geometry info from spatialite by running the SQL SELECT > DiscardGeometryColumn... > I think this feature will come around sooner or later. It belongs to > the (spatialite)manager plugin, and, even if I miss it as well, I > don't think it should be implemented in the custom db query plugin. > > Cheers _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer