title: VB.NET 2005 connecting to SQL Server Express, No errors but cmds don't run
body: <p>I am trying to connect to SQL Server Express locally using VB.NET 2005. I pulled  my connection string directly from the app.config file. When I run, I get NO errors and the connection states returns open, however the commands are not being processed.</p>
  
  <pre><code>Imports System.Data
  Imports System.Data.SqlClient
  
  Public Class frmAddMovie
      Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
      Me.Close()
  End Sub
  
  Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click    
      Dim conString As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Movies.mdf;Integrated Security=True;User Instance=True;"
      Dim con As New SqlConnection(conString)
      Dim cmd As New SqlCommand("Insert Into tblMovies(fldTitle, fldDirector, fldRating)Values('Solar Babies', 'PG', 'Rick Flair')", con)
  
      Using con
         con.Open()
         cmd.ExecuteNonQuery()
      End Using
  
      If MessageBox.Show("Movie Added") = Windows.Forms.DialogResult.OK Then
          Me.Close()
      End If
  
  End Sub
  End Class
  </code></pre>