Results 1 to 2 of 2

Thread: Connection

  1. #1
    Join Date
    Dec 1969

    Default Connection

    Hi All,<BR> Is it possible to do connection to two SQL servers at the same time as in my case, i need to fetch information from tables residing in two SQL servers..<BR><BR>Any help would be appreciated. Thanks :)

  2. #2
    Join Date
    Dec 1969

    Default RE: Connection

    Of course, you can open two different connections like this:<BR><BR>conn1 = Server.CreateObject("ADODB.Connection")<BR>conn1.o pen YourConnectionString1<BR><BR>conn2 = Server.CreateObject("ADODB.Connection")<BR>conn2.o pen YourConnectionString2<BR><BR>Another possibility is to make only one connection to database1, and retrieve the information in database2 through that connection by using queries like<BR><BR>SELECT * FROM MyServer2.MyDatabase2..MyTable <BR><BR>For this to work right you must specify the second server to be &#039;linked&#039; to the first one. You can do that in the enterprise manager, in the tree in MyServer2SecurityLinked Servers<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