Solved

OPENROWSET difficulties

Posted on 2006-06-29
6
627 Views
Last Modified: 2010-05-18

Hi, there!

I typed the following at the Management Studio (SQL Server 2005) :

SELECT Access.*
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'C:PathToDatabase\DatabaseName.mdb';'sa';'',tblFromDatabase) As Access

and I got the following error message:

OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Not a valid account name or password.".
Msg 7399, Level 16, State 1, Line 4
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. Authentication failed.
Msg 7303, Level 16, State 1, Line 4
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".

Please help. (I tried '' instead of 'sa" and it didn´t work, either)

If I have to use some "real" login/password, where should I look for them?  When I create the ADO string connection for the database, I do not put login nor password...)

Thanks!
fskilnik
0
Comment
Question by:fskilnik
6 Comments
 
LVL 10

Accepted Solution

by:
RichardCorrie earned 175 total points
ID: 17010603
the default user name for Access is 'Admin' (without the quotes)

/Richard
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 175 total points
ID: 17010607
SELECT Access.*
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'C:PathToDatabase\DatabaseName.mdb';'admin';'',tblFromDatabase) As Access
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17010684
Here is an example from BOL

USE pubs
GO
SELECT a.*
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
   'c:\MSOffice\Access\Samples\northwind.mdb';'admin';'mypwd', Orders)
   AS a
GO

0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:fskilnik
ID: 17010705

Done!  :)

Thanks for the (same minute) very quick responses, Richard and angelII. I will split points, I guess it´s fair.

P.S.: could you be most kind and have a look at another SQL Server 2005 question of mine that seems much harder, please?  Here:   http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21902340.html

Best regards,
fskilnik.
0
 

Author Comment

by:fskilnik
ID: 17010744

Hi, aneeshattingal.

Thanks for your reply. Sorry about points, didn´t see it before...  :(

But... please have a look at my other question, ok?!  I would be glad to reward you too.

Thanks,
fskilnik
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17010771
no probs
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now