SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Openrowset problem - Windows XP and SQL 2008
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

juvethski
Starting Member

Canada
46 Posts

Posted - 05/06/2013 :  10:18:15  Show Profile  Reply with Quote
Hi,

There's a ton of thread all over about the openrowset and tried the solutions but I am still getting this error:

The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered.

I also tried the Access Jet and getting this error:

The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.

I am using Windows XP and SQL 2008, any help will be highly appreciated.

Some of the solutions I tried are from this thread:
http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/75a20ddc-ac3f-42c1-99fc-ccfc70a47ae2/


~~~~~~~~~~~~~~~~
how's your data?

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1050 Posts

Posted - 05/06/2013 :  13:15:21  Show Profile  Reply with Quote
What you're trying to do with OpenRowSet? are you trying to read/write data from a flat file using sql server? Can you provide details of what you're trying to perform?

Cheers
MIK
Go to Top of Page

juvethski
Starting Member

Canada
46 Posts

Posted - 05/06/2013 :  13:27:45  Show Profile  Reply with Quote
sorry should have provided those details right away. i was trying to import and xlsx file into a sql table, like this statement below:

select *
into SQLServerTable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=D:\testing.xlsx;HDR=YES',
'SELECT * FROM [Sheet1$]')

thanks :)



~~~~~~~~~~~~~~~~
how's your data?

Edited by - juvethski on 05/06/2013 13:28:13
Go to Top of Page

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1050 Posts

Posted - 05/06/2013 :  13:36:17  Show Profile  Reply with Quote
Try saving the ".xlsx" file into ".xls" and then execute the query and see what it says

select *
into SQLServerTable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=D:\testing.xls;HDR=YES',
'SELECT * FROM [Sheet1$]')

1) Make sure that you've a sheet named in that file as "Sheet1"
2) Make sure that the file is not open during query execution.


Cheers
MIK

Edited by - MIK_2008 on 05/06/2013 13:36:44
Go to Top of Page

juvethski
Starting Member

Canada
46 Posts

Posted - 05/06/2013 :  13:42:41  Show Profile  Reply with Quote
thanks for replying. i did try the xls and still got the same error message.

~~~~~~~~~~~~~~~~
how's your data?
Go to Top of Page

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1050 Posts

Posted - 05/06/2013 :  14:44:10  Show Profile  Reply with Quote
May be you would like to check and see if Msjet40.dll is there on your machine.
http://support.microsoft.com/kb/239114

Cheers
MIK
Go to Top of Page

juvethski
Starting Member

Canada
46 Posts

Posted - 05/06/2013 :  18:55:42  Show Profile  Reply with Quote
I believe I have the latest version (Windows XP sp3) which is : 4.0.9511.0

Any help will be highly appreciated. Thanks!

~~~~~~~~~~~~~~~~
how's your data?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000