views:

32

answers:

1

I'm handed a path of an access 2000(/2003 (edit)), or access 2007 database:

C:\database.mdb

or

C:\database.accdb

I have to determine a suitable connection string, using either ACE or JET, to connect to the database. I was wondering whether parsing the last part of the string and determining whether it is mdb or accdb is guaranteed to reliably determine whether to use ACE or JET? Or is there a better way?

edit: Since ACE is installed along with access 2007 and required to communicate with access 2007 databases, but is NOT standardly installed with access 2003 or lower, it seems most reliable to open access 2003 wit JET, and access 2007 with ACE. So go with the extension approach to determine this?

+1  A: 

You can use ACE for 2000 (mdb) and 2007 (accdb).

Remou
...the point here being that you can use ACE for both formats. The only reason you might choose otherwise is if ACE is not installed, in which case you'd be able to access only MDBs.
David-W-Fenton