Solved

OPENROWSET difficulties

Posted on 2006-06-29
6
624 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL 2012 and SQL 2014 in memory database 11 32
separate column 24 21
Numeric sequence in SQL 14 38
SQL Query for Periods 3 0
In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
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 …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

746 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

12 Experts available now in Live!

Get 1:1 Help Now