<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Steve,<br>
    <br>
    That's good news.<br>
    <br>
      I did run into the "spaces" problems on Windows (I had a space
    between the comma and the table name).  It caused the connection to
    fail.<br>
    <pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
    <br>
    On 5/31/2012 12:14 PM, <a class="moz-txt-link-abbreviated" href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a> wrote:
    <blockquote
cite="mid:OFFE4A6237.AFEF71DC-ON85257A0F.00631967-85257A0F.006433D4@isn.rtss.qc.ca"
      type="cite">
      <p><font face="sans-serif" size="2">for ogrinfo we were using, as
          explained
          here,
<a class="moz-txt-link-freetext" href="http://mapserver.org/input/vector/VirtualSpatialData.html#steps-for-display">http://mapserver.org/input/vector/VirtualSpatialData.html#steps-for-display</a></font><br>
        <font face="sans-serif" size="2">ogrinfo
          ODBC:User/Pwd@mssql__archives
          msStatut_station2002_2006</font>
        <br>
        <font face="sans-serif" size="2">That was working on windows</font>
      </p>
      <p><font face="sans-serif" size="2">Though, That doesn't work on
          our linux
          distro linux sles 11 sp1. It as to be (comma instead of space)</font>
        <br>
        <font face="sans-serif" size="2">ogrinfo
          ODBC:User/Pwd@mssql__archives,msStatut_station2002_2006</font>
      </p>
      <p><font face="sans-serif" size="2">But, For some reasons, this
          still doesn't
          work to get the list of tables on our linux distro</font>
        <br>
        <font face="sans-serif" size="2">ogrinfo
          ODBC:User/Pwd@mssql__archives</font>
        <br>
        <font face="sans-serif" size="2">But it is useless in my case.</font>
        <br>
        <br>
        <font face="sans-serif" size="2">Also, our virtual data file
          looks like
          this on windows</font>
        <br>
        <font face="sans-serif" size="2"><OGRVRTDataSource></font>
        <br>
        <font face="sans-serif" size="2">    <OGRVRTLayer
          name="stations"></font>
        <br>
        <font face="sans-serif" size="2">       
          <SrcDataSource>ODBC:User/Pwd@mssql__archives</SrcDataSource>
        </font>
        <br>
        <font face="sans-serif" size="2">         
               
          <SrcLayer>dbo.msStatut_station2002_2006</SrcLayer>
        </font>
        <br>
        <font face="sans-serif" size="2">         
                <GeometryType>wkbPoint</GeometryType>
        </font>
        <br>
        <font face="sans-serif" size="2">         
                <LayerSRS>WGS84</LayerSRS></font>
        <br>
        <font face="sans-serif" size="2">         
                <GeometryField encoding="PointFromColumns"
          x="Longitude" y="Latitude"/> </font>
        <br>
        <font face="sans-serif" size="2">    </OGRVRTLayer></font>
        <br>
        <font face="sans-serif" size="2"></OGRVRTDataSource></font>
        <br>
        <br>
        <font face="sans-serif" size="2">That is working on windows</font>
        <br>
        <br>
        <font face="sans-serif" size="2">For our distro linux We need to
          add
          the table name</font>
        <br>
        <font face="sans-serif" size="2"><SrcDataSource>ODBC:User/Pwd@mssql__archives,msStatut_station2002_2006</SrcDataSource>
        </font>
        <br>
        <br>
        <font face="sans-serif" size="2">Perhaps it is not a windows vs
          linux
          issue but an OGR version issue.</font>
        <br>
        <font face="sans-serif" size="2">Thanks for your help</font>
        <br>
        <font face="sans-serif" size="2">Steve</font>
      </p>
      <p>
        <br>
        <br>
        <br>
        <table width="100%">
          <tbody>
            <tr valign="top">
              <td width="40%"><font face="sans-serif" size="1"><b>Brent
                    Fraser <a class="moz-txt-link-rfc2396E" href="mailto:bfraser@geoanalytic.com"><bfraser@geoanalytic.com></a></b>
                </font>
                <p><font face="sans-serif" size="1">2012-05-31 10:49</font>
                </p>
              </td>
              <td width="59%">
                <table width="100%">
                  <tbody>
                    <tr valign="top">
                      <td>
                        <div align="right"><font face="sans-serif"
                            size="1">A</font></div>
                      </td>
                      <td><font face="sans-serif" size="1"><a class="moz-txt-link-abbreviated" href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a></font>
                      </td>
                    </tr>
                    <tr valign="top">
                      <td>
                        <div align="right"><font face="sans-serif"
                            size="1">cc</font></div>
                      </td>
                      <td><font face="sans-serif" size="1"><a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a></font>
                      </td>
                    </tr>
                    <tr valign="top">
                      <td>
                        <div align="right"><font face="sans-serif"
                            size="1">Objet</font></div>
                      </td>
                      <td><font face="sans-serif" size="1">[Polluriel
                          potentiel]  Re: [gdal-dev]
                          ogr ODBC problem</font></td>
                    </tr>
                  </tbody>
                </table>
                <br>
                <table>
                  <tbody>
                    <tr valign="top">
                      <td>
                        <br>
                      </td>
                      <td><br>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <br>
              </td>
            </tr>
          </tbody>
        </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 moz-do-not-send="true"
          href="mailto:Steve.Toutant@inspq.qc.ca"><font color="blue"
            size="3"><u>Steve.Toutant@inspq.qc.ca</u></font></a><font
          size="3">
          wrote: </font>
        <br>
        <font face="sans-serif" size="2"><br>
          Thanks Jeff</font><font size="3"> </font><font
          face="sans-serif" size="2"><br>
          I got now OGR_ODBC: Table �s���s!.��������� has no identified
          FID column.</font><font size="3"> <br>
        </font><font face="sans-serif" size="2"><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 face="sans-serif" size="2"><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
          face="Times New Roman" size="3">OGRVRTDataSource</font><font
          face="sans-serif" size="2">
          and create geometry from point.</font><font size="3"> <br>
        </font><font face="sans-serif" size="2"><br>
          Any clue on what I can do?</font><font size="3"> </font><font
          face="sans-serif" size="2"><br>
          thanks</font><font size="3"> </font><font face="sans-serif"
          size="2"><br>
          steve</font><font size="3"> </font><font face="sans-serif"
          size="2"><br>
        </font>
      </p>
      <p><font size="3"><br>
          <br>
        </font>
        <table width="100%">
          <tbody>
            <tr valign="top">
              <td width="67%"><font face="sans-serif" size="1"><b>Jeff
                    McKenna </b></font><a moz-do-not-send="true"
                  href="mailto:jmckenna@gatewaygeomatics.com"><font
                    color="blue" face="sans-serif" size="1"><b><u><jmckenna@gatewaygeomatics.com></u></b></font></a><font
                  face="sans-serif" size="1"><b>@lists.osgeo.org</b>
                  <br>
                  Envoyé par : </font><a moz-do-not-send="true"
                  href="mailto:gdal-dev-bounces@lists.osgeo.org"><font
                    color="blue" face="sans-serif" size="1"><u>gdal-dev-bounces@lists.osgeo.org</u></font></a><font
                  size="3">
                </font>
                <p><font face="sans-serif" size="1">2012-05-30 17:06</font><font
                    size="3">
                  </font>
                </p>
              </td>
              <td width="32%">
                <br>
                <table width="100%">
                  <tbody>
                    <tr valign="top">
                      <td width="14%">
                        <div align="right"><font face="sans-serif"
                            size="1">A</font></div>
                      </td>
                      <td width="85%"><a moz-do-not-send="true"
                          href="mailto:gdal-dev@lists.osgeo.org"><font
                            color="blue" face="sans-serif" size="1"><u>gdal-dev@lists.osgeo.org</u></font></a><font
                          size="3">
                        </font>
                      </td>
                    </tr>
                    <tr valign="top">
                      <td>
                        <div align="right"><font face="sans-serif"
                            size="1">cc</font></div>
                      </td>
                      <td>
                        <br>
                      </td>
                    </tr>
                    <tr valign="top">
                      <td>
                        <div align="right"><font face="sans-serif"
                            size="1">Objet</font></div>
                      </td>
                      <td><font face="sans-serif" size="1">Re:
                          [gdal-dev] ogr ODBC problem</font></td>
                    </tr>
                  </tbody>
                </table>
                <br>
                <br>
                <table width="100%">
                  <tbody>
                    <tr valign="top">
                      <td width="50%">
                        <br>
                      </td>
                      <td width="50%"><br>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <br>
              </td>
            </tr>
          </tbody>
        </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 moz-do-not-send="true"
          href="mailto:Steve.Toutant@inspq.qc.ca"><tt><font color="blue"
              size="2"><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
            color="blue" size="2"><u><br>
            </u></font></tt><a moz-do-not-send="true"
          href="http://www.gatewaygeomatics.com/"><tt><font color="blue"
              size="2"><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 color="blue"
            size="2"><u><br>
            </u></font></tt><a moz-do-not-send="true"
          href="mailto:gdal-dev@lists.osgeo.org"><tt><font color="blue"
              size="2"><u>gdal-dev@lists.osgeo.org</u></font></tt></a><tt><font
            color="blue" size="2"><u><br>
            </u></font></tt><a moz-do-not-send="true"
          href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"><tt><font
              color="blue" size="2"><u>http://lists.osgeo.org/mailman/listinfo/gdal-dev</u></font></tt></a><font
          size="3">
          <br>
          <br>
          <br>
        </font>
      </p>
      <p>
        <br>
        <tt><font size="3">_______________________________________________<br>
            gdal-dev mailing list<br>
          </font></tt><a moz-do-not-send="true"
          href="mailto:gdal-dev@lists.osgeo.org"><tt><font color="blue"
              size="3"><u>gdal-dev@lists.osgeo.org</u></font></tt></a><tt><font
            size="3"><br>
          </font></tt><a moz-do-not-send="true"
          href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"><tt><font
              color="blue" size="3"><u>http://lists.osgeo.org/mailman/listinfo/gdal-dev</u></font></tt></a>
        <br>
        <br>
        <br>
      </p>
    </blockquote>
  </body>
</html>