Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server does not exist or access denied.

Status
Not open for further replies.

maccaroo

Programmer
Jan 28, 2005
11
0
0
GB
Hi. I'm trying to connect to a remote database. If I use Query Analyser, no matter what method I use, I seem to get this one error message: "SQL Server does not exist or access denied." The method I'd like to use is something like the following:

SELECT field1, field2, field3
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=MyDSN;User ID=MyUserName;Password=MyPass'
).MyCatalogue.dbo.MyTable

If I try connect via Enterprise Manager it works great. I know the username/password are correct. There's definitely not a connection problem (since EM works fine). Is there something else I'm missing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top