I have sql server 2008 R2 64bit Developer's Edition Installed on my machine.
And Microsoft Office 2010 Professional 32bit.
I have been trying to import some Excel data from an Excel sheet into a sql server database. I have used the following query to do this:
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\Files\BlueFile.xlsx;IMEX=1', 'SELECT * FROM [Sheet1$]')
I understand sql server has disabled this feature by default as a security measure, however I executed the following statements to enable it.
sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Ad Hoc Distributed Queries', 1; GO RECONFIGURE; GO
Yet every time I execute the select statement to get data from Excel sheet I get the following error.
Msg 7308, Level 16, State 1, Line 1 OLE DB provider
'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.