I have an app that's been working fine in 32 bit using the connection string:
Driver={Microsoft Access Driver (*.mdb)}; Dbq=MyDatabase.mdb;
using ADO in C++ on a PC with no Office installation.
I have converted it to x64 and I believe I need to install some form of Access drivers no matter if the host PC has x64 Office installed or not. So I grab Microsoft Access Database Engine 2016 Redistributable and install it.
In general everything works OK but certain SQL queries are failing. Most noticeably ones that use LIKE '%somevalue%'
- now I understand that %
is ANSI-92 but it's been working fine as I say so assume that's ADO related (I could change this to ALIKE
I guess).
What I don't understand is if I install the Access Database Engine 2010 then all works as expected. It seems that something is different in the Access Database Engine 2016. I did look for some release notes/breaking changes but couldn't find anything.
So my question is are there changes in the way SQL is parsed in Microsoft Access Database Engine 2016 and should I simply get customers to install the 2010 version?
Note: the other query that seems to be failing is a table with a Yes/No
field. I have a query that checks: field <> 0
and this throws an exception.
Update: If I install the Microsoft Access 2016 Runtime then all seems to work. So the issue seems specific the Microsoft Access Database Engine 2016
So in summary:
No Office Installed: Installed Access 2016 x64 Database Engine: Query FAILS
No Office Installed: Installed Access 2010 x64 Database Engine: Query PASSES
32bit Office Installed: Installed Access 2016 x64 Database Engine: Query FAILS
32bit Office Installed: Installed Access 2010 x64 Database Engine: Query PASSES
x64 Office Installed: Installed Access 2016 x64 Database Engine: Query PASSES
Where the Query is:
SELECT * from sometable WHERE somefield LIKE '%ABC%';
The setup is:
Window 10 Version 1909
32 bit Office: Microsoft Office MSO 16.0.12325.20280 32bit
64 bit Office: Microsoft Office MSO 16.0.12325.20280 64bit
Access database engine (x64) from here: microsoft.com/en-us/download/details.aspx?id=54920
My app is x64