Solved

Newbie Urgent Question on connecting from SQL Server Express 2005 to MS Access

Posted on 2006-07-01
6
767 Views
Last Modified: 2012-05-05
Basic but urgent question... I've got SQL Server Express locally on my workstation. I also have an MS Acces database locally on my workstation. From SQL Server, I must run a series of SELECT statements against the Access database. I understand from the docs and online that I need to have a linked server. Apparently, I'm not getting the syntax right, however.

The MS Access DB has no security. The workstation user is 'Tom.'

The error I get on the 2nd statement below is:
Msg 15007, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 76
'Tom' is not a valid login or you do not have permission.


EXEC sp_addlinkedserver
@server = 'pcf'
, @Srvproduct = 'Access'
, @Provider = 'Microsoft.Jet.OLEDB.4.0'
, @datasrc = 'C:\mydata\Tom01JUL.mdb'
GO

sp_addlinkedsrvlogin 'pcf', false, 'Tom', 'Admin', NULL;

SELECT code
FROM pcf...shift
GO

Though not difficult, there's a level of urgency on this, so thus the higher point ranking.
0
Comment
Question by:DataDesignIT
  • 4
  • 2
6 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17024484
change the provider to

   @provider = 'Microsoft.Jet.OLEDB.4.0',
 
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17024485
Sorry wrong post
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17024488
i mean the server product to

   @srvproduct = 'OLE DB Provider for Jet'

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:DataDesignIT
ID: 17024502
I  changed the server name, since pcf already existed, and ran the following:

EXEC sp_addlinkedserver
@server = 'pcf1'
, @srvproduct = 'OLE DB Provider for Jet'
, @Provider = 'Microsoft.Jet.OLEDB.4.0'
, @datasrc = 'C:\mydata\Tom01JUL.mdb'
GO


I still got the same Msg 15007 on the next line:
   sp_addlinkedsrvlogin 'pcf1', false, 'Tom', 'Admin', NULL

0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 17024515


sp_addlinkedsrvlogin 'pcf', false, 'sa', 'Admin', NULL; -- do you have a username 'Tom' in the sql server ... i changed to 'sa'
0
 

Author Comment

by:DataDesignIT
ID: 17024561
YIPEE! Thanks. I'm in! I didn't have a 'Tom' user in the SQL Server.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

837 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