<br><font size=3>Thanks Brent for your answer.</font>
<br>
<br><font size=3>But ....view's primary key</font><font size=2 face="sans-serif">?</font>
<br><font size=2 face="sans-serif">I'm missing something here...What do
you mean by that? Do you mean a column with a unique id in the view?</font>
<br><font size=2 face="sans-serif">There is no such column in my view.
</font><font size=3>Is ogr now needs a unique id in a view? Because it
was working before I migrate to linux with a recent vertsion of gdal.</font>
<br>
<br><font size=2 face="sans-serif">Also, My problem is before using </font><tt><font size=3>CONNECTIONTYPE
OGR<br>
    CONNECTION "<OGRVRTDataSource></font></tt>
<br>
<br><font size=2 face="sans-serif">A simple ogrinfo like this</font>
<br><tt><font size=3>ODBC:username/password@WebMapDSN,v_MyPoints</font></tt>
<br>
<br><font size=2 face="sans-serif">Gives me the error OGR_ODBC: Table �s���s!.���������
has no identified FID column.</font><font size=3> </font>
<br>
<br><font size=3>Thanks in advance</font>
<br><font size=2 face="sans-serif">Steve</font>
<br>
<br><font size=2 face="sans-serif"><br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Brent Fraser <bfraser@geoanalytic.com></b>
</font>
<p><font size=1 face="sans-serif">2012-05-31 10:49</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">Steve.Toutant@inspq.qc.ca</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">gdal-dev@lists.osgeo.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">[Polluriel potentiel]  Re: [gdal-dev]
ogr ODBC problem</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><font size=3>Steve,<br>
<br>
  Here's a snippet from a MapServer map file I used to access a non-spatial
MS SQL server via OGR+VRT+ODBC:<br>
</font><tt><font size=3><br>
    TYPE POINT<br>
    CONNECTIONTYPE OGR<br>
    CONNECTION "<OGRVRTDataSource><br>
        <OGRVRTLayer name='v_MyPoints'><br>
        <SrcDataSource>ODBC:username/password@WebMapDSN,v_MyPoints</SrcDataSource><br>
           <SrcSQL><br>
            SELECT * FROM  v_MyPoints
<br>
            WHERE  PropertyID=%PropertyID%<br>
        </SrcSQL><br>
        <b><FID>PointID</FID></b><br>
        <GeometryType>wkbPoint</GeometryType><br>
        <GeometryField encoding='PointFromColumns'
y='SurfaceLatitude'  x='SurfaceLongitude'/><br>
        <LayerSRS>NAD83</LayerSRS><br>
        </OGRVRTLayer><br>
    </OGRVRTDataSource>"<br>
<br>
    PROCESSING "CLOSE_CONNECTION=DEFER"<br>
<br>
    DATA "v_MyPoints"</font></tt><font size=3><br>
<br>
In my case I was able to use the view's primary key as the FID.  Hope
this helps...</font>
<br><tt><font size=3>Best Regards,<br>
Brent Fraser</font></tt>
<br><font size=3><br>
On 5/31/2012 7:48 AM, </font><a href=mailto:Steve.Toutant@inspq.qc.ca><font size=3 color=blue><u>Steve.Toutant@inspq.qc.ca</u></font></a><font size=3>
wrote: </font>
<br><font size=2 face="sans-serif"><br>
Thanks Jeff</font><font size=3> </font><font size=2 face="sans-serif"><br>
I got now OGR_ODBC: Table �s���s!.��������� has no identified
FID column.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I found that several users had this problem but found no solution. I don't
have write access to this MSSQL server.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I'm connecting via ODBC to a non spatial table, but it contains latitude
and longitude information. I will use it to define a </font><font size=3 face="Times New Roman">OGRVRTDataSource</font><font size=2 face="sans-serif">
and create geometry from point.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Any clue on what I can do?</font><font size=3> </font><font size=2 face="sans-serif"><br>
thanks</font><font size=3> </font><font size=2 face="sans-serif"><br>
steve</font><font size=3> </font><font size=2 face="sans-serif"><br>
</font>
<p><font size=3><br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=67%><font size=1 face="sans-serif"><b>Jeff McKenna </b></font><a href=mailto:jmckenna@gatewaygeomatics.com><font size=1 color=blue face="sans-serif"><b><u><jmckenna@gatewaygeomatics.com></u></b></font></a><font size=1 face="sans-serif"><b>@lists.osgeo.org</b>
<br>
Envoyé par : </font><a href="mailto:gdal-dev-bounces@lists.osgeo.org"><font size=1 color=blue face="sans-serif"><u>gdal-dev-bounces@lists.osgeo.org</u></font></a><font size=3>
</font>
<p><font size=1 face="sans-serif">2012-05-30 17:06</font><font size=3>
</font>
<td width=32%>
<br>
<table width=100%>
<tr valign=top>
<td width=14%>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td width=85%><a href="mailto:gdal-dev@lists.osgeo.org"><font size=1 color=blue face="sans-serif"><u>gdal-dev@lists.osgeo.org</u></font></a><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: [gdal-dev] ogr ODBC problem</font></table>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=50%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
<br>
<br>
</font><tt><font size=2><br>
On 12-05-30 5:09 PM, </font></tt><a href=mailto:Steve.Toutant@inspq.qc.ca><tt><font size=2 color=blue><u>Steve.Toutant@inspq.qc.ca</u></font></tt></a><tt><font size=2>
wrote:<br>
> <br>
> Hi!<br>
> I use this command to get the tables from an ODBC connection<br>
> ogrinfo ODBC:User/Pwd@DNS<br>
> <br>
> The connection is succesful but I get this error several times<br>
> ERROR 1: No column definitions found for table '�s���s!.�����������',<br>
> layer not usable.<br>
> <br>
> I used OGR ODBC for several months from a Windows server to a MSSQL
server<br>
> Now I'm migrating to linux and accessing the same MSSQL SERVER and
I get<br>
> this error.<br>
> <br>
> Note that if I connect with isql, I can connect and query the database<br>
> without problem.<br>
> So the problem really seems to be with OGR<br>
> <br>
> What can cause this No column definitions found for table error<br>
> And why the table name looks like this  '�s���s!.�����������',<br>
<br>
Hi Steve,<br>
<br>
I was just debugging an ogrinfo command for MS4W/Oracle, and was<br>
reminded of the trick to show more debug info at the commandline:<br>
<br>
  set CPL_DEBUG=on<br>
<br>
I'm going to keep that one in my back pocket from now on.<br>
<br>
-jeff<br>
<br>
<br>
<br>
<br>
-- <br>
Jeff McKenna<br>
MapServer Consulting and Training Services</font></tt><tt><font size=2 color=blue><u><br>
</u></font></tt><a href=http://www.gatewaygeomatics.com/><tt><font size=2 color=blue><u>http://www.gatewaygeomatics.com/</u></font></tt></a><tt><font size=2><br>
<br>
<br>
_______________________________________________<br>
gdal-dev mailing list</font></tt><tt><font size=2 color=blue><u><br>
</u></font></tt><a href="mailto:gdal-dev@lists.osgeo.org"><tt><font size=2 color=blue><u>gdal-dev@lists.osgeo.org</u></font></tt></a><tt><font size=2 color=blue><u><br>
</u></font></tt><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"><tt><font size=2 color=blue><u>http://lists.osgeo.org/mailman/listinfo/gdal-dev</u></font></tt></a><font size=3>
<br>
<br>
<br>
</font>
<p>
<br><tt><font size=3>_______________________________________________<br>
gdal-dev mailing list<br>
</font></tt><a href="mailto:gdal-dev@lists.osgeo.org"><tt><font size=3 color=blue><u>gdal-dev@lists.osgeo.org</u></font></tt></a><tt><font size=3><br>
</font></tt><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"><tt><font size=3 color=blue><u>http://lists.osgeo.org/mailman/listinfo/gdal-dev</u></font></tt></a>
<br>
<br>
<br>