how can i solve "The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered."?

Posted by Phsika on Stack Overflow See other posts from Stack Overflow or by Phsika
Published on 2010-06-11T07:24:43Z Indexed on 2010/06/11 7:42 UTC
Read the original article Hit count: 361

Filed under:
|
|

i try to use get excel data from excel file. i am using office 2007 and sql 2005. i writed below codes:

CREATE TABLE [dbo].[Addresses_Temp] (
    [FirstName]   VARCHAR(20),
    [LastName]    VARCHAR(20),
    [Address]     VARCHAR(50),
    [City]        VARCHAR(30),
    [State]       VARCHAR(2),
    [ZIP]         VARCHAR(10)
)
GO

INSERT INTO [dbo].[Address_Temp] ( [FirstName], [LastName], [Address], [City], [State], [ZIP] )
SELECT [FirstName], [LastName], [Address], [City], [State], [ZIP]
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
                'Excel 8.0;Database=C:\Source\Addresses.xls;IMEX=1',
                'SELECT * FROM [Sayfa1$]')

Error:Msg 7403, Level 16, State 1, Line 2 The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered.

How can i solve it?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about sql-server