Dan,<div><br></div><div>You can specify the geometry column name along with the table name in the connection string, something like:</div><div><br></div><div>MSSQL:server=servername;database=dbname;tables=schemaname.tablename(geomcolumnname)</div>
<div><br></div><div>for more information see: <a href="http://www.gdal.org/ogr/drv_mssqlspatial.html">http://www.gdal.org/ogr/drv_mssqlspatial.html</a></div><div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div>
<div><br></div><div><br></div><div><br><div class="gmail_quote">2011/10/26 Dan Homerick <span dir="ltr">&lt;<a href="mailto:danhomerick@gmail.com">danhomerick@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The current logic for detecting the geometry or geography column will<br>
accept a column of type &quot;image&quot; (a subset of binary string[1]) as the<br>
GeomColumn. Furthermore, the logic checks the column types<br>
sequentially, and will accept an &quot;image&quot; column as the GeomColumn,<br>
even if there is a &quot;geometry&quot; or &quot;geography&quot; later in the list of<br>
columns.<br>
<br>
I came across this by trying to do queries on a table which does not<br>
have any spatial data, but which does have column of type &quot;image&quot;. The<br>
image column was incorrectly assumed to be a geometry column, which<br>
naturally led to errors. This was despite NOT using &quot;OGRSQL&quot; as the<br>
dialect.<br>
<br>
There doesn&#39;t appear to be any interface to specify which, if any,<br>
column should be used as the GeomColumn -- am I (hopefully!) just<br>
overlooking something?<br>
<br>
[1] <a href="http://msdn.microsoft.com/en-us/library/ms187752.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms187752.aspx</a><br>
<br>
- Dan<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br></div>