[mapserver-dev] ODBC Connection...

Brent Fraser bfraser at geoanalytic.com
Mon Jun 15 23:49:56 EDT 2009


Christian,

  Assuming your ODBC datasource is connecting to your database, you may
need to specify the spatial reference system of your data, either in the
VRT spec below using <LayerSRS>, or in the LAYER object of your map file
with a PROJECTION object.

You could try adding "DEBUG 5" to the layer definition and using shp2img
to see if it reports any errors.

Best Regards,
Brent Fraser




> Hi All...
>
> I'm trying to connect my map with some MS SQL Server data...
>
> So, I'm trying to do it using an ODBC connection via OGR in a *.OVF
> file...
>
> This is the code in the file:
>
> <OGRVRTDataSource>
>     <OGRVRTLayer name="cartracks">
>         <SrcDataSource>ODBC:trak/trakrm at webtrak</SrcDataSource>
>         <SrcSQL>SELECT TOP 1 ID FROM Guardar WHERE ID='53377'</SrcSQL>
>         <GeometryType>wkbPoint</GeometryType>
>         <GeometryField encoding="PointFromColumns" x="Lon" y="Lat"/>
>     </OGRVRTLayer>
> </OGRVRTDataSource>
>
> But I cannot see anything...
>
> Somebody knows what is wrong?
>
> I'm in a Linux environment, with Mapserver 5.4.0 and Chameleon...
>
> Thanks...
>
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>




More information about the mapserver-dev mailing list