Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to configure Openrowset() in sql server 2008? I want to insert the excel sheet file having 30Thousand records.
Posted

 
Share this answer
 
Comments
Kamalkant(kk) 16-May-12 4:41am    
exec sp_configure 'show advanced options', 1
RECONFIGURE;
exec sp_configure 'Ad Hoc Distributed Queries', 1
RECONFIGURE;


SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\Users\Admin\Desktop\247ProjectMonitoring\UploadExcelfile\Test.xls;HDR=YES;IMEX=1;', 'SELECT * FROM [Sheet1$]')
--------------------------------------------
STILL THE ERROR IS COMMING
I.E:The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
 
Share this answer
 
Comments
Kamalkant(kk) 16-May-12 4:42am    
exec sp_configure 'show advanced options', 1
RECONFIGURE;
exec sp_configure 'Ad Hoc Distributed Queries', 1
RECONFIGURE;


SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\Users\Admin\Desktop\247ProjectMonitoring\UploadExcelfile\Test.xls;HDR=YES;IMEX=1;', 'SELECT * FROM [Sheet1$]')
--------------------------------------------
STILL THE ERROR IS COMMING
i.e:The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
How to configure Openrowset() in sql server 2008? I want to insert the excel sheet file having 30Thousand records.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900