<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Try renaming your "Lines" table to "lines" - remove the upper case "L"<br><br>I'm not a spatiallite user, but this might help...<br><br><br>Brent Wood<br><br>--- On <b>Sat, 2/23/13, Rahkonen Jukka <i><jukka.rahkonen@mmmtike.fi></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Rahkonen Jukka <jukka.rahkonen@mmmtike.fi><br>Subject: Re: [mapserver-users] Connection to SpatiaLite utilizing SQL<br>To: "Roman" <romat2@gmail.com>, "mapserver-users@lists.osgeo.org" <mapserver-users@lists.osgeo.org><br>Date: Saturday, February 23, 2013, 12:02 PM<br><br><div class="plainMail">Hi,<br><br>I checked my mapfiles and I have been using<br>CONNECTIONTYPE OGR<br>CONNECTION "\ms4w\data\OSM_Suomi_20120213.sqlite"<br>PROCESSING "CLOSE_CONNECTION=DEFER"<br>DATA "select geometry,
 osm_id ,place , name from osm_point where place is not null"<br><br>Nothing so much different than what you have. The error you get looks a bit odd and suggests that Mapserver is trying to find a table called "Lines(geometry)".<br><br>I would make a blind try and copy the "Lines" table to another table with all underscore characters in the table name.<br><br>-Jukka Rahkonen-<br><br>________________________________<br>Roman wrote:<br><br>Hi list,<br>I have a working connection to SpatiaLite<br><br>  CONNECTION "c:/Temp/test.sqlite"<br>  DATA "Lines"<br><br>For certain layers I need to specify connection by SQL. According to <a href="http://mapserver.org/input/vector/sqlite.html" target="_blank">http://mapserver.org/input/vector/sqlite.html</a> I tried this:<br><br>  CONNECTION "c:/Temp/test.sqlite"<br>  DATA "SELECT geometry FROM Lines"<br><br>With 6.2.0 stable it does not render specified layer and does not throw any error.<br>With
 development version taken from <a href="http://www.gisinternals.com/sdk/" target="_blank">http://www.gisinternals.com/sdk/</a> I get an error "msOGRFileNextShape(): OGR error. Unable to query table Lines(geometry) for column definitions : no such table: Lines(geometry)."<br><br>Geometry column is correctly registered in geometry_columns table and "ogrinfo test.sqlite Lines -summary" says "Geometry Column = geometry". Where could be the problem?<br><br>Thank you in advance.<br><br>Roman<br><br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote></td></tr></table>