Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.16.0"

-- -- 872 Reputation points
2022-03-18T04:46:17.067+00:00

Hi

I have a t-sql stored procedure which links tables from local sql server db with tables from an MS Access linked server. The stored proc runs fine in ssms. However when I run the stored proc from a c# app I get below error;

System.Data.SqlClient.SqlException: 'Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.16.0" for linked server

How can I fix this?

So far I have tried;

  • Running SQL Server under Local System Account with 'Allow service to interact with desktop'.
  • Giving Everyone permission to C:\Users\SQL Service account name\AppData\Local\Temp.
  • EXEC sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.16.0', N'AllowInProcess', 0
  • Removing Read-only CheckBox from C:\Users\SQL Service account name\AppData\Local\Temp.
  • Giving Everyone permissions to MS Access file/folder.

Thanks

Regards

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,760 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,555 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Naomi 7,361 Reputation points
    2022-03-18T04:55:22.733+00:00

    Why 12.0 if it talks about 16.0 ? Also, are you using 32 bit or 64 bit?

    Check if this old blog may be of any help

    https://blogs.lessthandot.com/index.php/datamgmt/dbprogramming/mssqlserver/ace/