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

All,

How can I retrieve recordsets from tables on two diffrent servers using classic asp OR a view in MS SQL Management Stuido?
UpperdeckerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
Since the server (and the login) are part of the connection string, you would have to make two separate queries.
0
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?
0
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.
0
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.

references:
http://msdn.microsoft.com/en-us/library/ms188279.aspx
http://msdn.microsoft.com/en-us/library/ms190479.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
UpperdeckerAuthor Commented:
Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.