SP_CONFIGURE 'SHOW ADVANCED OPTIONS',1
RECONFIGURE
EXEC SP_CONFIGURE 'Ad Hoc Distributed Queries',1
RECONFIGURE
插入的代码:
INSERT INTO dbo.Resources(ResourcesUrl,ResourcesLink,ResourcesText) SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;HDR=YES;Database=F:\Book1.xls', [sheet1$])