• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

How to retrieve recordsets from tables on two diffrent servers in classic asp


How can I retrieve recordsets from tables on two diffrent servers using classic asp OR a view in MS SQL Management Stuido?
2 Solutions
Dave BaldwinFixer of ProblemsCommented:
Since the server (and the login) are part of the connection string, you would have to make two separate queries.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
+1 for Dave.  It is as easy as 2 connection strings and call it twice.

Do you need to search both db's at the same time?  for what type of data and results?
Vitor MontalvãoMSSQL Senior EngineerCommented:
view in MS SQL Management Studio
You need to create a Linked Server from one server to the other one, so you can write a View referring a table in another database.
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
the linked server is the best route to go, and just to expand on Vitor's post, you can easily create a linked server in Management Studio or by using the sp_addlinkedserver stored procedure.

UpperdeckerAuthor Commented:
Thank you.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now