Two issues w/ MDBtools...

Robert Nix
  • Robert Nix

    Robert Nix - 2008-04-02

    Tried MDBtools because I have an MDB file I need to extract the database from.

    First problem: While building the tools on Mac, I ran into a problem compiling backend.c. It contains the statement "static GHashTable *mdb_backends;". Unfortunately, the file mdbtools.h contains the line "extern GHashTable       *mdb_backends;". Having the included statement causes the compiler to choke on the static statement in backend.c.

    The way I got past this was to change mdbtools.h to read as follows:

    /* hash to store registered backends */
    #ifndef _BACKEND_C
    extern GHashTable       *mdb_backends;

    And in backend.c, I changed as follows:

    #define _BACKEND_C

    #include "mdbtools.h"

    Obviously, you don't see the problem in your compiler, or have different defaults than I. You can address the issue if you like....

    My second problem is that I have an MDB file with a database in it that I'd like to extract. Dumping the file, I can see the data I'm looking for, but mdb-export dumps all blank records. The number of records is correct, but the data is all either low dates for the date field, or "" for the text fields. mdb-table shows the table, mdb-schema shows the database layout, but mdb-export and mdb-array both give me 89 of the blank records, such as:

    145,"01/01/70 00:00:00","","","","","","","","","",""
    146,"01/01/70 00:00:00","","","","","","","","","",""
    147,"01/01/70 00:00:00","","","","","","","","","",""
    148,"01/01/70 00:00:00","","","","","","","","","",""
    149,"01/01/70 00:00:00","","","","","","","","","",""
    150,"01/01/70 00:00:00","","","","","","","","","",""
    151,"01/01/70 00:00:00","","","","","","","","","",""
    152,"01/01/70 00:00:00","","","","","","","","","",""

    mdb-ver returns "JET4".

    Is there any way to recover this data?
    Bob Nix

  • Anonymous - 2010-03-11

    The proper solution to the extern/static issue is to change this line:
    extern GHashTable *mdb_backends;
    static GHashTable *mdb_backends;

  • Anonymous - 2010-03-11

    This post is in a lot of places, here is my response as posted in another thread identical to this one:

    The line:
    extern GHashTable *mdb_backends;
    Should be changed to:
    static GHashTable *mdb_backends;


Log in to post a comment.