[Gdal-dev] iODBC drivers for Mac OS X

William Kyngesburye woklist at kyngchaos.com
Tue Jan 10 14:28:35 EST 2006


On Jan 10, 2006, at 10:59 AM, Frank Warmerdam wrote:

>> Time to grab some MDBs from Arc and try out the GDAL personal
>> geodatabase format driver!
>
> I hope you will follow up on how well this works.   You may find
> you need to fiddle with the line:
>
>
>         sprintf( pszDSN, "DRIVER=Microsoft Access Driver  
> (*.mdb);DBQ=%s",
>                  pszNewName );
>
> in gdal/ogr/ogrsf_frmts/pgeo/ogrpgeodatasource.cpp.  It needs
> to have the proper name for the driver to be used.   Before fiddling
> with that you might want to try the raw ODBC driver.
>
Ah, thanks for the tip.  I didn't think about the way you had the PDB  
driver setup - it takes a file name, but transforms that into a DSN,  
right?  Do you mean the string: "DRIVER=Microsoft Access Driver  
(*.mdb);" must match something in the ODBC driver?

I found 2 different strings when setting up an Access DSN with this  
new iODBC driver: one in the configuration dialogs telling me the  
final configuration, very long and descriptive, but it's not recorded  
anywhere when I click OK; and one short one in the DSN list where it  
shows the driver name.  Like so:

Actual ODBC Driver for Access Databases version 1.0

or driver name (from odbcinst.ini):

Actual Access

There's also the driver binary.  If I look at the resulting odbc.ini,  
it says driver = {path/to/iodbc/access/driver}


After a test with the raw ODBC format, it looks like it's the ODBC  
driver binary.  It doesn't work with the descriptive driver name or  
the odbcinst.ini driver name.  Kinda annoying.  Is that an ODBC  
thing?  I would have thought that, since the drivers are defined in  
odbcinst.ini and given a name, one would use those names for the  
driver in a DSN.

Would it be possible to add an option to the PGEO driver to override  
the ODBC driver, in case someone (on any platform even) doesn't use  
an Access driver with the name you have in the source (ie on  
different platforms and from different authors)?  (Or is it already  
possible? and how?)

-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy




More information about the Gdal-dev mailing list