Trying to convert Excel Import actions in a C# program using DataTables, to using T-SQL so all processing is on the server side.
Setup:
Query:
SELECT * INTO Data_dq
FROM OPENROWSET('Microsoft.ACE.OLEDB.16.0',
'Excel 12.0; Database=\\Server1\ExcelFileToImport.xlsx', [Sheet1$]);
GO
I have tried both OLEDB.16.0 & OLEDB.12.0 but can't get past these errors.
Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.16.0" has not been registered.
Msg 7403, Level 16, State 1, Line 6
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.
Engine16.0 is installed and 12.0 cannot be installed concurrently. The attempt to do so throws and installation error.
There is a lot of chatter on the internet for this error but it always comes down to installing the 12.0. This is not an option so am I out of luck?
I also found this and applied:
sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE;
GO
Regards,
Lance