Posting solution from comments to close off the question.
Try using
db.OpenEx("Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=XXX");
Points to note:
- The parameter pair
Uid=
and
Pwd=
are only required if the MS Access database is password protected, otherwise omit them entirely
- You need the
*.accdb
in the Driver because that is its name - even if your database is an
.mdb
- the XXX must be the fully pathed name of your database including the extension
Unless you are explicitly using features only available in
.mdb
files you might want to consider updating to the
.accdb
format. More detail on the differences can be found at
Which Access file format should I use? - Microsoft Support[
^]