Search code examples
vbaexcelversioningadoms-jet-ace

ADO Library References and Forward Compatibility


I'm looking to add some Access database functionality in a customer's Excel workbook app. Okay Excel & VBA aren't my first choice, but that is what we're working with.

Normally I use ADO through ADO.NET, so we always know the version because we've built for a specific version of .NET.

However with VBA and regular ADO, this is not the case. Are the ADO libraries forward compatible? For example, if I referenced 6.0 would it work on everything from Vista onwards? (or 2.7 and XP)

Is there any way of doing this? Ie. referencing so that it will work on "all reasonably-installed versions". Or do I have to use late binding to ensure multi-version compatibility?

We need to support both 32 bit and 64 bit, so I'll be using ACE (and hence Access 2007 onwards). Waiting for confirmation on the XP - I suspect we can drop that too.


Solution

  • In my opinion you should use late binding in your situation. In such situation you can rely on compiler to use the most appropriate library available on computer where your code will be used.