[mapserver-users] OGR ODBC Layer with Password

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Dec 17 15:21:22 PST 2013


On 2013-12-17 7:13 PM, Brent Fraser wrote:
> Donald,
> 
>   It's kind of a work-around, but a few years ago (mapserv v5.2.1) I
> used the following method to connect to a database via ODBC:
> 
>     CONNECTIONTYPE OGR
>     CONNECTION "<OGRVRTDataSource>
>         <OGRVRTLayer name='myTable'>
> <SrcDataSource>ODBC:myUser/myPassword at myDSN,myTable</SrcDataSource>
>             <SrcSQL>
>                 SELECT Longitude, Latitude, IDFROM  myTable
>             </SrcSQL>
>             <FID>ID</FID>
> <GeometryType>wkbPoint</GeometryType>
>             <LayerSRS>NAD83</LayerSRS>
>             <GeometryField encoding='PointFromColumns' y='Latitude' 
> x='Longitude'/>
>         </OGRVRTLayer>
>     </OGRVRTDataSource>"
> 
>     PROCESSING "CLOSE_CONNECTION=DEFER"
> 
>     DATA "myTable"
> 
> Best Regards,
> Brent Fraser

true, and this is well documented at
http://www.mapserver.org/input/vector/VirtualSpatialData.html

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



More information about the MapServer-users mailing list