[Gdal-dev] building GDAL under cygwin with ODBC

Frank Warmerdam warmerdam at pobox.com
Tue Jul 14 12:09:26 EDT 2009


Neil Best wrote:
> 
> 
> Neil Best wrote:
>> Does anyone know if it's possible?
>>
>> I said:  ./configure --with-odbc=/usr/include/w32api
>>
> 
> It doesn't seem possible, so I am resigned to making it work in the FWTools
> DOS shell.  Is it possible to make a DSN-less ODBC connection?  In other
> words, can I specify my data source on the fly without having to go through
> the ODBC Administrator and setting up every single Access file as a DSN? 
> Something along the lines of:
> 
> ODBC:"Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\somepath\mydb.mdb;" 
> 
> (Lifted from
> http://www.carlprothman.net/Default.aspx?tabid=90#ODBCDriverForAccess )
> 
> Otherwise I'll have to write something in Perl using Win32::ODBC to loop
> through all of my Access files and set up a DSN for each one.

Neil,

I have reviewed the current OGR ODBC driver and it does not seem to be
possible to pass in datasource names of the form you suggest though it is
vaguely possible that some appropriate magic quoting might get it to work.

I will say that the PGeo driver internally uses exactly this form to
access .mdb files through the same underlying ODBC machinery without
creating a DSN.  So at most the OGR ODBC driver would need some adjustments
to support it.

I will take a crack at this today, and if it I get it working I'll push out
a new FWTools release with the support.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list