[mapserver-users] OGR Join To MS-Access Without Using ODBC

Brent Fraser bfraser at geoanalytic.com
Fri Dec 3 06:56:16 PST 2010


James,

   Is it the ODBC system you don't want to use, or just the need to 
create an ODBC DataSource?  To avoid creating a DataSource, I tried 
using ogrinfo (v1.7.1) on the command line:

ogrinfo ODBC:"Driver={Microsoft Access Driver 
(*.mdb)};Dbq=t_505033.mdb",basic basic

and that worked.  But the need for quoting caused mapserver v5.6.3 to 
crash when I tried single quotes around the ODBC portion:

DATA "SELECT * FROM t_505033 LEFT JOIN ODBC:'Driver={Microsoft Access 
Driver (*.mdb)};Dbq=G\GeoData\Parcels\Alberta\t_505033.mdb'.basic ON 
t_505033.PID=basic.PID"

or

     DATA "SELECT * FROM t_505033 LEFT JOIN 'ODBC:Driver={Microsoft 
Access Driver (*.mdb)};Dbq=G\GeoData\Parcels\Alberta\t_505033.mdb'.basic 
ON t_505033.PID=basic.PID"


I wonder if there is a way to escape the double quotes in the DATA object?

Best Regards,
Brent Fraser


On 12/2/2010 10:30 PM, James Card wrote:
> I'm trying to determine what syntax to use to create an OGR join to an 
> MS Access database *without* using ODBC (on a Windows server). Is that 
> possible?
>
> Current syntax is: DATA "SELECT * FROM LHFO_Routes shp LEFT JOIN 
> 'ODBC:Routes_MDB,vRoutesTheme'.vRoutesTheme mdb ON 
> shp.ROAD_NO_=mdb.RouteNumber"
>




More information about the MapServer-users mailing list