question

78669366 avatar image
0 Votes"
78669366 asked JackJJun-MSFT commented

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

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-transact-sqldotnet-sqlclient
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@78669366, Welcome to Microsoft Q&A, could you provide some code example with me so that I could reproduced your problem?

0 Votes 0 ·

1 Answer

NaomiNNN avatar image
0 Votes"
NaomiNNN answered 78669366 commented

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/

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi

Sorry it was a typo. I will try your suggestion. Thanks.

Regards

0 Votes 0 ·