Solved

OPENROWSET difficulties

Posted on 2006-06-29
6
636 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 143

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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need sql in string 2 30
access to sql migration 5 24
SQL Distinct Question 3 15
How to get last 5 mins records from getdate() in sql? 2 15
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.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
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

733 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