Connection string that works for SQL Server 2012

  • I am trying to write a connection string that works for SQL Server 2012.

    Here is my attempt but I am using data from:

    http://www.connectionstrings.com/sql-server/

    I believe the below is the "Express" version when I have the full version:

    <connectionStrings>

    <add name="Context" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\path\App_Data\db.mdf;Integrated Security=True;Connect Timeout=30"

    providerName="System.Data.SqlClient" />

    </connectionStrings>

    Could someone give me many real world examples of working connection strings.

  • http://www.connectionstrings.com/[/url]

    John

  • Pretty sure this is not needed for a normal connection:AttachDbFilename=C:\path\App_Data\db.mdf

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • philosophaie (4/10/2015)


    I am trying to write a connection string that works for SQL Server 2012.

    Here is my attempt but I am using data from:

    http://www.connectionstrings.com/sql-server/

    I believe the below is the "Express" version when I have the full version:

    <connectionStrings>

    <add name="Context" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\path\App_Data\db.mdf;Integrated Security=True;Connect Timeout=30"

    providerName="System.Data.SqlClient" />

    </connectionStrings>

    Could someone give me many real world examples of working connection strings.

    Quick questions, what software are you connecting from? Which drivers are you using? Why do you think there is a difference between connecting to Express or other editions? What are the Server's network configurations?

    😎

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply