MS Access linked tables with the SQL 2016 Always Encrypted

Is it possible to use MS Access linked tables with the SQL 2016 Always Encrypted feature? I created a test table in SQL 2016 that has encrypted fields, and I've set the ODBC connection permissions. I can't seem to find any documentation beyond that specific to working in MS Access.
Michael MurphyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nakul VachhrajaniTechnical Architect, Capgemini IndiaCommented:
MS Access and MS SQL Server are two different DB platforms. Hence, you will not be able to use functionality provided by one (SQL Server) in another (Access).
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
The encryption/decryption is performed by the ADO.NET drivers, so no, you would not be able to do this.

See these articles for more in-depth information about this feature:
Michael MurphyAuthor Commented:
I'd initially read that "The only driver that can successfully support Always Encrypted feature is .NET 4.6". Then when doing some research for implementing always encrypted in our application I ran across this post titled "Using Always Encrypted with the Windows ODBC Driver".

We also have an Access application.  Since we use a Windows ODBC Driver to connect our Access front end to a SQl back end I thought there might be a way to make the always encrypted feature to work in that scenario. It would be great if the encryption could work in both applications.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Nakul VachhrajaniTechnical Architect, Capgemini IndiaCommented:
The article ( actually refers to clients using ODBC drivers, i.e. if a client uses ODBC connections, then Always Encrypted can be supported when accessing/working with data on an AlwaysEncrypted database.

Always Encrypted allows client applications to encrypt sensitive data and never reveal the data or the encryption keys to SQL Server or Azure SQL Database.

The pre-requisite first step in this article is to enable AlwaysEncrypted on the database (server-side operation) and this is only supported for SQL Server & Azure SQL Database.

The challenge with Access is that it has a totally different paradigm for data access, storage and manipulation when compared to SQL Server. Access is more of a file storage for local operations rather than a centralized database which is what makes it difficult to implement AlwaysEncrypted in Access.
Michael MurphyAuthor Commented:
With the new ODBC 13.1 driver, tweaking the new settings, and also importing the certificate from the sql server onto the client machine the linked tables will work.

In MS Access I've been able to read, edit, and insert all fields within a linked table that has Always Encrypted columns. It is linked via ODBC from the SQL Server.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Nakul VachhrajaniTechnical Architect, Capgemini IndiaCommented:
I am not convinced. The traffic between the client and SQL Server would be using Always Encrypted, but I doubt if the traffic between SQL Server and linked Access database is encrypted.

What configuration did you have to do on the Access end to decrypt the Always Encrypted traffic? How did you validate that Access was using Always Encrypted?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:

I believe the author is referring to an Access application, and not Access in terms of data storage (local or otherwise). In this scenario, Access contains only the Forms, Reports, VBA Code, etc - so it is certainly possible the ODBC method would work, and I see no reason for objecting on those grounds.

If the data is encrypted on SQL Server, but not in the linked Access table, then I believe that would evidence enough that it works ...
Michael MurphyAuthor Commented:
I've tested with the ODBC 11 driver. The encrypted columns are not readable, editable, etc.

I've also tested with the ODBC 13 driver. The encrypted columns are readable, editable, etc. The table is also limited in its operation, as noted in the online documentation regarding the behaviors and limitations for tables with encrypted columns. Such as not being able to sort, etc.

When I try to run sql commands that would work on an unencrypted table, but are supposed to fail when Always Encrypted is enabled, the commands fail with encryption related errors.

My erro early on was that I had not correctly imported the certificate onto the client machine where MS Access is intalled. The certificate is a key piece of the puzzle. The ODBC driver alone will not work.
Michael MurphyAuthor Commented:
Also, Scott describes my scenario perfectly. I tend to just call it front end and back end with linked tables. I'll adjust my explanation in the future.

A lot of the documentation still indicates that the .net connection is the only option, and does not include reference to the new ODBC 13 driver which I was able to get to work in combination with the cert.

I should also note that deleting the linked table in Access, and then making a new linked connection was necessary. Just using the Linked Table Manager to refresh the linked tables after updating the ODBC driver was not sufficient. The Linked Table Manager method left the columns encrypted/unreadable. Replacing the links provided full functionality.
Nakul VachhrajaniTechnical Architect, Capgemini IndiaCommented:
Ok, now I get it. Thank-you, Scott & Michael for clarifying.

I thought Access was also involved as a data storage which is the point I was not convinced about. If Access is just being used as a front-end while the actual data storage was in SQL Server. Sure - that would be a valid case for Always Encrypted :)

Thanks again for the clarification and sorry for the confusion. I no longer have any objections.

Have a wonderful week-end!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.