have sql server 2008 64bit Developer’s Edition Installed on my machine.
And Microsoft Office 2013 Professional 64bit.
I have been trying to import and export some Excel data from an Excel sheet into a sql server database. I have used the following query to do this :-
sp_configure ‘show advanced options’, 1; GO RECONFIGURE; GO sp_configure ‘Ad Hoc Distributed Queries’, 1; GO RECONFIGURE; GO
USE [ERPInventorySystem]; GO SELECT *FROM OPENROWSET(‘Microsoft.ACE.OLEDB.12.0′, ‘Excel 12.0;Database=C:\Users\pratiks\Downloads\contact.xls;’, ‘SELECT * FROM [Sheet1$]’)
GO But the error message says,
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.
Aucun commentaire:
Enregistrer un commentaire