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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query using a SQL Server linked server

Status
Not open for further replies.

jgillin

Programmer
Oct 22, 2003
82
US
Hi,
I've created on Linked Server using Enterprise Manager (via Remote Desktop) on my dedicated internet server. Now, I'm trying to use a query from ASP to get data from that server. BTW, the linked server works fine in EM. I can see all the tables, etc.
In ASP, it's returning an "Invalid object name".
The SQL statement created is:

SELECT userID, email, username, first_name, last_name, user_pass, last_visited
INTO users_table
FROM [MYOTHERSERVER].[users_table].[dbo]
WHERE [MYOTHERSERVER].[users_table].[dbo].[userID] > 2795

ASP returns the SQL error:
Microsoft OLE DB Provider for SQL Server error '80040e37'
Invalid object name 'MYOTHERSERVER.users_table.dbo'.

Is it possible to reference a Linked Server in ASP?
BTW, I can't seem to do it from Query Analyzer either.

Thanks for any thoughts or suggestions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top