title: connect vb 2008 with sql server 2005 locally
body: <p>I'm trying to connect vb 2008 with sql server 2005 locally. I have the database at the same laptop but I always get an error. Here's my code: </p>
  
  <pre><code>Dim strconn As String 
  strconn = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Database;Data Source=(local)" 
  Try 
      Dim connection As New SqlClient.SqlConnection(strconn) 
      connection.Open() 
  Catch ex As Exception 
      MessageBox.Show("failed") 
  End Try 
  </code></pre>
  
  <p>If I run this, its going to prompt "Failed" messagebox. 
  Is there any wrong with the code? What should I do</p>