Merge pull request #9 from evanmiller/master

Improved support for Access 2010, 2013, and 2016
This commit is contained in:
Cyber Emissary 2018-12-28 05:36:46 -05:00 committed by GitHub
commit 9ca5f6e8fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 4 deletions

View File

@ -9,7 +9,7 @@ SYNOPSIS
DESCRIPTION
mdb-ver is a utility program distributed with MDB Tools.
It will return a single line of output with 'JET3' for those files produced in Access 97 format, 'JET4' for those produced by Access 2000, XP and 2003, 'ACE12' for those produced by Access 2007, or 'ACE14' for those produced by Access 2010.
It will return a single line of output corresponding to the program that produced the file: 'JET3' (for files produced by Access 97), 'JET4' (Access 2000, XP and 2003), 'ACE12' (Access 2007), 'ACE14' (Access 2010), 'ACE15' (Access 2013), or 'ACE16' (Access 2016).
OPTIONS

View File

@ -66,9 +66,11 @@ enum {
};
enum {
MDB_VER_JET3 = 0,
MDB_VER_JET4 = 1,
MDB_VER_JET4 = 0x01,
MDB_VER_ACCDB_2007 = 0x02,
MDB_VER_ACCDB_2010 = 0x0103
MDB_VER_ACCDB_2010 = 0x03,
MDB_VER_ACCDB_2013 = 0x04,
MDB_VER_ACCDB_2016 = 0x05
};
enum {
MDB_FORM = 0,

View File

@ -71,6 +71,12 @@ MdbCatalogEntry *entry = mdb_get_catalogentry_by_name(mdb, "SummaryInfo");
case MDB_VER_ACCDB_2010:
version = "ACE 14 (Access 2010)";
break;
case MDB_VER_ACCDB_2013:
version = "ACE 15 (Access 2013)";
break;
case MDB_VER_ACCDB_2016:
version = "ACE 16 (Access 2016)";
break;
default:
version = "Unknown";
}

View File

@ -221,7 +221,7 @@ MdbHandle *mdb_open(const char *filename, MdbFileFlags flags)
mdb_close(mdb);
return NULL;
}
mdb->f->jet_version = mdb_get_int32(mdb->pg_buf, 0x14);
mdb->f->jet_version = mdb_get_byte(mdb->pg_buf, 0x14);
switch(mdb->f->jet_version) {
case MDB_VER_JET3:
mdb->fmt = &MdbJet3Constants;
@ -229,6 +229,8 @@ MdbHandle *mdb_open(const char *filename, MdbFileFlags flags)
case MDB_VER_JET4:
case MDB_VER_ACCDB_2007:
case MDB_VER_ACCDB_2010:
case MDB_VER_ACCDB_2013:
case MDB_VER_ACCDB_2016:
mdb->fmt = &MdbJet4Constants;
break;
default:

View File

@ -81,6 +81,12 @@ main(int argc, char **argv)
case MDB_VER_ACCDB_2010:
printf("ACE14\n");
break;
case MDB_VER_ACCDB_2013:
printf("ACE15\n");
break;
case MDB_VER_ACCDB_2016:
printf("ACE16\n");
break;
default:
printf(_("unknown database version\n"));
break;