SQL Connection over TCP/IP

Last post 06-16-2009 12:59 AM by FrankKalis. 3 replies.
Page 1 of 1 (4 items)
Active Topics My Discussions Unanswered Sort Posts: Previous Next
  • 06-14-2009 11:53 PM

    SQL Connection over TCP/IP

    Dear All

    I am working on a project where I have to connect to remote servers over TCP/IP for which I need connection Strings. I googled it and tried many TCP/IP connection strings but none of them worked.

    my scenario is as under:

    I am in the main headquarter office and we have 60+ regional offices. These offices are connected to our main server (in the Headquarter) via Dialup or WLL. In the regional offices we have also local networks of 5 - 10 PCs with 1 x Server. The dialup they use is not directly connected from server rather it is installed (Modem) on client PC from that regional office network.

    Now I want how to connect to that regional office Server Database where the modem is connected to some client on that regional office network. is it still any possibility to connect to them?

     

    Please help me it is very urgent.

     

    Regards.

     

  • 06-16-2009 12:13 AM In reply to

    Re: SQL Connection over TCP/IP

    Welcome to the forum...

    Have tried specifying the port number in your connection string? if not try it because sometimes it will not able to find the port...

    MohammedU.
    Microsoft SQL Server MVP
    Moderator
    SQL-Server-Performance.com

    All postings are provided “AS IS” with no warranties for accuracy.
  • 06-16-2009 12:25 AM In reply to

    Re: SQL Connection over TCP/IP

     Thanks MohammaedU you replied me.

    The following is the script for remote SQL Connection over TCP/IP. I am extracting the IP Address from the database and put in the connection string. When the connection status after opening is checked it returns "0" means not connected.

    So Please let me know necessary changes.

     

    While Not rsData.EOF
      
          Conn_New.Open = "Provider=sqloledb;Data Source="& rsData("IP")& ",1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;"

       Response.Write( Conn_New.state & "   " )
       Response.Write("                           " & rsData("IP") )
       Response.Flush()

       IF Conn_New.State = Open Then
        Conn_New.Close
       End if


      rsData.MoveNext
      Wend

     

    Regards,

  • 06-16-2009 12:59 AM In reply to

    Re: SQL Connection over TCP/IP

    Not sure, if it helps, but have a look here: http://www.connectionstrings.com

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Contributing Editor, Writer & Forum Moderator http://www.sql-server-performance.com
    Webmaster: http://www.insidesql.org
    View Frank Kalis's profile on LinkedIn
Page 1 of 1 (4 items)
Active Topics   My Discussions    Unanswered Posts


© 2010 Jude O'Kelly All Rights Reserved.