Changes between Version 1 and Version 2 of PGeo


Ignore:
Timestamp:
Dec 6, 2007, 9:07:17 AM (16 years ago)
Author:
Mateusz Łoskot
Comment:

Added PGeo notes

Legend:

Unmodified
Added
Removed
Modified
  • PGeo

    v1 v2  
    11= OGR PGeo Driver =
    22
    3 Put notes about OGR PGeo driver here.
     3This page collects notes about OGR [http://www.gdal.org/ogr/drv_pgeo.html PGeo] driver.
     4
     5The PGeo driver works very well on Windows. On Unix-like systems, it uses [http://www.unixodbc.org/ unixODBC] with [http://mdbtools.sourceforge.net/ MDB Tools] driver (libmdbtools) and the driver is unstable and broken in some places (refer notes below and PGeo driver manual for details).
     6
     7== DSN-less Connection Notes ==
     8
     9Generally, DSN-less connection is broken in MDB Tools. Here is post about this [http://article.gmane.org/gmane.comp.db.mdb-tools.devel/1038 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.
     10
     11As 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'':
     12
     13{{{
     14#!C
     15--- mdbtools-0.6pre1/src/odbc/odbc.c    2004-05-30 10:06:43.000000000 +0200
     16+++ patched/mdbtools-0.6pre1/src/odbc/odbc.c    2006-05-23 23:08:54.000000000 +0200
     17@@ -156,7 +156,8 @@
     18 
     19    params = ((ODBCConnection*) hdbc)->params;
     20 
     21-   if (!(dsn = ExtractDSN (params, szConnStrIn)))
     22+   /* XXX - mloskot DSN-less connection
     23+    * if (!(dsn = ExtractDSN (params, szConnStrIn)))
     24    {
     25       LogError ("Could not find DSN in connect string");
     26       return SQL_ERROR;
     27@@ -168,6 +169,7 @@
     28    }
     29    else
     30    {
     31+   */
     32       SetConnectString (params, szConnStrIn);
     33 
     34       if (!(database = GetConnectParam (params, "Database")))
     35@@ -175,7 +177,7 @@
     36         LogError ("Could not find Database parameter");
     37         return SQL_ERROR;
     38       }
     39-   }
     40+   /* }*/
     41    ret = do_connect (hdbc, database);
     42    return ret;
     43 }
     44}}}