Connecting to a database in visual studio 2010 using c# credentials
<p>I'm pretty new to c# asp.net etc so bear with me :)
I've been looking on the internet for the right syntax so I can connect to my database which is on my computer.</p>

<p>I've tried this:</p>

<pre><code> SqlConnection myConnection = new SqlConnection("server=localhost;" +
                                               "Trusted_Connection=yes;" +
                                               "database=mmcinfo.mdf;");
</code></pre>

<p>But i get an error on the myConnection.Open(); saying:</p>

<blockquote>
  <p>SqlException was unhandled by user code A network-related or
  instance-specific error occurred while establishing a connection to
  SQL Server. The server was not found or was not accessible. Verify
  that the instance name is correct and that SQL Server is configured to
  allow remote connections. (provider: Named Pipes Provider, error: 40 -
  Could not open a connection to SQL Server)</p>
</blockquote>

<p>I know im doing something wrong in calling the right database/server etc but i havent got a clue how to fix this.</p>
