For accessing data with JET, we used to fill the provider with "Microsoft.JET.OLEDB.4.0", and it works great on all WinXP machines.

With newer version of Windows, Microsoft decided to kill JET on 64-bit side and refuse to port it there. Instead, they tell us to use the new ACE engine.

That's fine. But now the provider string has changed to "Microsoft.ACE.OLEDB.{MSOffice version}". For example, if you have Access 2007 installed, it would be "12.0". For Access 2010, that would be "14.0". And I still can't find what to specify for Access 2013 (I presume it's "15.0", but who knows?)

Is there anyway we can define static connectionstring for all versions without having to probe what version of ACE is installed, so that we only have to try connection twice (once for JET, the other for ACE)?