SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 sp_addlinkedsrvlogin
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

esthera
Flowing Fount of Yak Knowledge

1395 Posts

Posted - 02/04/2010 :  12:21:40  Show Profile  Reply with Quote

EXEC sp_addlinkedsrvlogin
@rmtsrvname = 'AccessDb',
@useself = 'false',
@locallogin = NULL,
@rmtuser = 'SysUser',
@rmtpassword = '905555'
GO

this is my code but it's not working
the problem is my access database is access password protected so there is no username but just a password?
how do i set this up
i know in my odbc dsn to this access database I set it up as
dsn=DB2000;PWD=905555

Kristen
Test

United Kingdom
22431 Posts

Posted - 02/05/2010 :  02:35:02  Show Profile  Reply with Quote
I think the Access user is "Admin" in such circumstances.

Alternatively use OPENDATASOURCE or OPENROWSET which allow you to enter a "normal" connection string.
Go to Top of Page

esthera
Flowing Fount of Yak Knowledge

1395 Posts

Posted - 02/05/2010 :  02:51:00  Show Profile  Reply with Quote
even with Admin i'm getting

OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDb" returned message "Cannot start your application. The workgroup information file is missing or opened exclusively by another user.".
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDb" reported an error. Authentication failed.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDb".


(Is locallogin suppsed to be null?
Go to Top of Page

esthera
Flowing Fount of Yak Knowledge

1395 Posts

Posted - 02/05/2010 :  02:52:17  Show Profile  Reply with Quote
what's the correct syntax to opendatasource - either from access or from my system dsn?
Go to Top of Page

Kristen
Test

United Kingdom
22431 Posts

Posted - 02/05/2010 :  03:58:18  Show Profile  Reply with Quote
See www.connectionstrings.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000