Connecting to the DB from Desktop Application

Discussion in 'Pre-sales questions' started by Guest, Oct 27, 2009.

  1. Guest

    Guest Guest

    Hello.

    We are writing an applicattion in Visual Basic 2008 .NET and need to connect directly to the SQL 2008 in Internet.

    Is it possible, or you only permit to connect from an ASP application?


    Thank you.
     
  2. Ray

    Ray

    As long as you pass the proper connection string and the correct db login credentials it should not be a problem.

    Try adding this line to your .Net web.config file.

    <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>

    Replace the db logins, db name, sql server name, and db password. You may also want to ensure that port 1433 is open on your end.
     

Share This Page