Most reliable solution to determine whether to use ACE or OLEDB in connection string?
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 开发者_JAVA百科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?
EDIT: It seems the most reliable way to determine whether to use ACE or JET, is to determine whether ACE in installed, and use that if it is installed.
You can use ACE for 2000 (mdb) and 2007 (accdb).
精彩评论