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

-- -- 957 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

Developer technologies Transact-SQL
SQL Server Other
{count} votes

1 answer

Sort by: Most helpful
  1. Naomi Nosonovsky 8,431 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/


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.