connect to SQL DB from behind corporate firewall

Discussion in 'Databases' started by mkwats, Jun 18, 2010.

  1. Hi,

    I am having difficulty connecting to my SQL database from a desktop VB application. When using connection string below, I get the following error "SQL Server does not exist or access denied".

    It works fine elsewhere but not when using corporate computers.

    strConnect = "Driver={SQL Server};" & _
    "Server=s01.Winhost.com;" & _
    "Database=DATABASE;" & _
    "UID=USER;" & _
    "PWD=PASSWORD;"
    cn.Open strConnect

    Any suggestions?

    Matt
     
    Last edited by a moderator: Oct 14, 2015
  2. Ray

    Ray

    What is the full error message. It sounds like you are not passing the correct values to through the connection string. How are you connecting? Are you using ASP.Net or classic ASP? If you are going through the ASP.Net configuration file (web.config) the connection string format in the web.config file will look like this...

    <connectionStrings>
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword" providerName="System.Data.SqlClient" />
    </connectionStrings>
     
  3. Error message attached.
    Connection using Visual Basic Application, not web based -- just taking data from the SQL server -- using connection string:

    Driver={SQL Server};Server=s01.Winhost.com; Database=DATABASE;UID=USER;PWD=PASSWORD;

    It works fine on computer outside of corporate network.

    Matt

    [​IMG]
     

    Attached Files:

    Last edited by a moderator: Oct 14, 2015
  4. Ray

    Ray

    It looks like you are having problems connecting to our SQL server on your end.

    Try running a traceroute and telnet test on your computer that is throwing the error.

    Go to MS DOS and type these commands.

    tracert s01.Winhost.com

    and then type...

    telnet s01.Winhost.com 1433

    Give us a copy of the results.
     
    Last edited by a moderator: Oct 14, 2015

Share This Page