title: Connecting to SQL Server database no opening MVC 4
body: <p>I am having trouble connecting to my database to run a query. Here us the connection and query info:</p>
  
  <pre><code> string connectionString = "Data Source=(LocalDB)\v11.0;AttachDbFilename=c:\\Webs\\MvcFFL\\MvcFFL\\App_Data\\Players.mdf;Integrated Security=True";
  
          string queryString =  "Truncate table Players;";
  using (SqlConnection connection = new SqlConnection(connectionString))
  {
      SqlCommand command = new SqlCommand(queryString, connection);
  
      connection.Open(); &lt;- Fails here opening the connection
  
      SqlDataReader reader = command.ExecuteReader();
      try
      {
          while (reader.Read())
          {
              Console.WriteLine(String.Format("{0}, {1}",
                  reader[0], reader[1]));
          }
      }
      finally
      {
          // Always call Close when done reading.
          reader.Close();
      }
  }
  </code></pre>
  
  <p>Can someone explain why this is failing to open the connection. This is using SQL Server. I have this declared at the top:</p>
  
  <pre><code>using System.Data.SqlClient;
  </code></pre>