[mapserver-users] OGR ODBC Layer with Password

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Dec 17 15:25:46 PST 2013


On 2013-12-17 6:15 PM, Donald Kerr wrote:
> Jeff,
> 
> I've tried all the combinations that I can think of and the following also
> works (creates test.png with the map & features) outside of mapserver on the
> command line:
> 
> shp2img -m my.map -o test.png
> 
> with:
> 
> CONNECTION "ODBC:Admin/MyPassword at MyDSNName,MyTableName"
> 
> in the map file.
> 
> The following two also work:
> 
> CONNECTION "ODBC: /MyPassword at MyDSNName,MyTableName"
> CONNECTION "ODBC: /MyPassword at MyDSNName"
> 
> ...but no joy with MapServer.
> 
> I've tried combinations of ' and "" - no luck.
> 
> Many thanks.
> 
> Regards,
> 
> Donald
> 
> 

I believe I also always test ODBC connections with a commandline tool, I
believe it is this:
http://msdn.microsoft.com/en-us/library/ms712676%28v=vs.85%29.aspx

Usually that shp2img works and something in MapServer/Apache doesn't, is
a sign that Apache can't find something (usually DSN is not configured
properly, as a System DSN).  But that is the first hint to this problem.

Wish I had access to your machine, I enjoy debugging this for clients.

Off to dinner.

-jeff



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


More information about the mapserver-users mailing list