Connecting to multiple databases

Results 1 to 2 of 2

Thread: Connecting to multiple databases

  1. #1
    Join Date
    Dec 1969

    Default Connecting to multiple databases

    I&#039;m trying to write a search that take a user keyword input and query it across multiple databases. What is the best scenario to this? Should I open each database connection, run the query, store the result, close the db connection, and repeat it until all results have captured and then display all results?<BR><BR>Does anyone have sample code that does this in an efficient manner?<BR><BR>Thanks...<BR>

  2. #2
    Join Date
    Dec 1969

    Default If you are using MS SQL Server

    then call an sp and let this SP query all the DB&#039;s<BR><BR>all you have to make sure is that all the servers are linked and the login has permissions on all the servers.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts