Wednesday, February 15, 2012

Microsoft.Ace.OLEDB.12.0 and OPENROWSET Errors


If you imports excel file into database using sql query 


INSERT INTO newtable
select  * FROM
OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\temp.xls;HDR=YES', 'SELECT * FROM [sheet$]')

and get below error message


Msg 7399, Level 16, State 1, Line 1
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.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "Microsoft.Ace.OLEDB.12.0" for linked server "(null)".






please run 2 sql below to solve it


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

2 comments:

fgdg said...

What gets us into trouble is not what we don't know.It's what we know for sure that just ain't so rs power leveling, Life is like a hot bath. It feels good while you're in it, but the longer you stay in, the more wrinkled you get rs item, life is too short to wake up in the morning with regrets. So, love the people who treat you rs items right and forget about the ones who do not.

fgdg said...

Let`s write that letter we thought of writing "one of these days Tibia Gold, just because someone doesn't love you the way you want them to, doesn't mean they don't love you with all they have Tibia coins, don't waste your time on a man/woman, who isn't willing to waste their time on you sro gold.