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?
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?