The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error.

Exec sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
 
Exec sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE;
GO
 
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'AllowInProcess' , 1; 
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'DynamicParameters' , 1;
GO
 
Insert into OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0','Data Source=C:\upload_test.xlsx;Extended Properties=Excel 12.0')...[Sheet1$]
SELECT ColumnNames FROM Your_table -- Sheet Should be already Present along with headers

EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'AllowInProcess' , 0;
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'DynamicParameters' , 0;
GO
 
Exec sp_configure 'Ad Hoc Distributed Queries', 0;
RECONFIGURE;
GO
 
Exec sp_configure 'show advanced options', 0
RECONFIGURE;
GO

Yorumlar

Bu blogdaki popüler yayınlar

TERMINAL SERVICES UNLIMITED

Uzak Masaüstü Bağlantı Geçmişini Silmek

Putty Komut dizini