The title says it all.
Command:
EXEC sp_configure 'show advanced options', 1
RECONFIGURE
GO
EXEC sp_configure 'ad hoc distributed queries', 1
RECONFIGURE
GO
INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\Users\ThienPham\Documents\export\export.xlsx;', 'SELECT * FROM [Sheet1$]')
SELECT * FROM [DATA].[dbo].[ddt]
i excuted it on MS SQL Server 2019 software. it's good. But when i excute it on Node-red, it's not work.
message: "Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"."
This is my flow
function code:
ena ="INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\Users\ThienPham\Documents\export\export.xlsx;', 'SELECT * FROM [Sheet1$]') ";
ena = ena + "SELECT * FROM [DATA].[dbo].[ddt]";
msg.topic = ena;
return msg;
infor
OS: Window 10 pro x64
MS SQL 2019
SQL authentication
Node-RED version: v1.2.9
Node.js version: v15.13.0
Help me! . Thanks