<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi All!</tt><tt><br>
</tt><tt><br>
</tt><tt>I am using the GDAL/OGR functions to query a shapefile.
This is a sample code I have been successfully running so far:</tt><tt><br>
</tt><tt><br>
</tt>
<blockquote><tt>OGRDataSource *poDS = OGRSFDriverRegistrar::Open(
"some/path/to/myshapefile.shp" );</tt><br>
<tt>OGRLayer *poLayer = poDS->ExecuteSQL( "select * from
myshapefile", NULL, NULL );</tt><br>
<tt>// ...</tt><br>
<tt>// fetching result features from "poLayer"</tt><br>
<tt>// ...</tt><br>
<tt>poDS->ReleaseResultSet( poLayer );</tt><br>
<tt>OGRDataSource::DestroyDataSource(poDS);</tt><br>
</blockquote>
<tt><br>
</tt><tt>As you can see, I am currently using the OGR SQL dialect,
as I am passing NULL as the third parameter of the
OGRDataSource::ExecuteSQL function.</tt><tt><br>
</tt><tt><br>
</tt><tt>Now I am trying to extend the SQL syntax to be able to use
the OGR SQLite dialect. I have successfully recompiled GDAL 1.11.1
with SQLite support (version 3.8.5) but when I try to execute the
same sample code (passing "SQLITE" as the 3rd argument of the
OGRDataSource::ExecuteSQL function) I am getting the following
error:</tt><tt><br>
</tt><tt><br>
</tt>
<blockquote><tt>In ExecuteSQL(): sqlite3_prepare(select * from
myshapefile): no such table: myshapefile</tt><br>
</blockquote>
<tt><br>
</tt><tt>What is the table name that contains the shapefile features
that I can use in my SQL queries</tt><tt>?</tt><tt><br>
</tt><tt><br>
</tt><tt>Thank you!</tt><br>
<pre class="moz-signature" cols="72">--
Pierluigi Guasqui
Software Engineer
Applied Coherent Technology Corporation (ACT)
<a class="moz-txt-link-abbreviated" href="http://www.actgate.com">www.actgate.com</a></pre>
</body>
</html>