Hi, We are using Windows Server 2008 R2 server. And SQL Server 2008 Express Edition. Facing OLEDB issue while Uploading an Excel in this server. Unable to fetch the record from Excel to Database.
Query: SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=D:\WebApplication\MSExcel.xlsx', 'SELECT * FROM [Sheet1$]')
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.
Please help me to fix this issue. And provide us Suitable Query to Fix this.