Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'Microsoft.ACE.OLEDB.12.0' 64x Sql Server and 86x Office?

The error:

OLE DB provider 'Microsoft.ACE.OLEDB.12.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.

And the answers I'm seeing is a conflict between 64 bit Sql Server and 32 bit Office. Is there a way to run an openrowset on Excel into Sql Server?

insert into dbo.FiscalCalendar 
select * from 
openrowset('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0 Xml;Database=C:\Users\uname\Desktop\fy11.xlsx;',
'Select * from [Sheet1]')
like image 909
Chris Hayes Avatar asked Dec 22 '22 02:12

Chris Hayes


2 Answers

...the key is to install the 64-bit Access engine using the /passive flag:

c:>AccessDatabaseEngine_64 /passive

like image 144
user1390375 Avatar answered Feb 23 '23 01:02

user1390375


Looks like Microsoft hasn't come up with a solution on this yet. check Microsoft feedback form of products

They have some workarounds like using SSIS

like image 22
Chris Hayes Avatar answered Feb 23 '23 01:02

Chris Hayes