Solved

OPENROWSET difficulties

Posted on 2006-06-29
6
639 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

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.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
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
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

617 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