SQL Server Performance

SQL Connection over TCP/IP

Discussion in 'General Developer Questions' started by mehboobafridi, Jun 14, 2009.

  1. mehboobafridi New Member

    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.
  2. MohammedU New Member

    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...
  3. mehboobafridi New Member

    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,
  4. FrankKalis Moderator

Share This Page