wiki:PGeo

Version 2 (modified by Mateusz Łoskot, 16 years ago) ( diff )

Added PGeo notes

OGR PGeo Driver

This page collects notes about OGR PGeo driver.

The PGeo driver works very well on Windows. On Unix-like systems, it uses unixODBC with MDB Tools driver (libmdbtools) and the driver is unstable and broken in some places (refer notes below and PGeo driver manual for details).

DSN-less Connection Notes

Generally, DSN-less connection is broken in MDB Tools. Here is post about this DSN-less connection not supported? sent to mdbtools-dev list but no reply has arrived so far. The libmdbtools expects DSN token in connection string, so opening .mdb file directly fails. This problem was identified in version mdbtools-0.6pre1 but mdbtools-0.5.99.0.6pre1.0.20050409 worked fine.

As manual recommendeds, the best option is to open Personal Geodatabase (.mdb file) using configured DSN connection. However, if one needs to open .mdb file directly, here is small patch for MDB Tools' file src/odbc/odbc.c:

--- mdbtools-0.6pre1/src/odbc/odbc.c    2004-05-30 10:06:43.000000000 +0200
+++ patched/mdbtools-0.6pre1/src/odbc/odbc.c    2006-05-23 23:08:54.000000000 +0200
@@ -156,7 +156,8 @@
 
    params = ((ODBCConnection*) hdbc)->params;
 
-   if (!(dsn = ExtractDSN (params, szConnStrIn)))
+   /* XXX - mloskot DSN-less connection
+    * if (!(dsn = ExtractDSN (params, szConnStrIn)))
    {
       LogError ("Could not find DSN in connect string");
       return SQL_ERROR;
@@ -168,6 +169,7 @@
    }
    else 
    {
+   */
       SetConnectString (params, szConnStrIn);
 
       if (!(database = GetConnectParam (params, "Database")))
@@ -175,7 +177,7 @@
         LogError ("Could not find Database parameter");
         return SQL_ERROR;
       }
-   }
+   /* }*/
    ret = do_connect (hdbc, database);
    return ret;
 }
Note: See TracWiki for help on using the wiki.