Solved

OPENROWSET difficulties

Posted on 2006-06-29
6
633 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
migration MS SQL database to Oracle 30 62
SQL Update trigger 5 18
SQL Insert parts by customer 12 34
SQL Server Connection String through a VPN 8 27
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

803 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