title: SQL command INSERT is working but the data not appear in table
body: <p>I am executing SQL command <code>INSERT</code> like this in my Visual C#.NET using MS VS 2010 Express Edition: </p>
  
  <pre><code>private void btnAdd_Click(object sender, EventArgs e)
  {
       SqlConnection con = new SqlConnection(Properties.Settings.Default.loginDBConnectionString);
       con.Open();
       SqlCommand cmd = new SqlCommand("INSERT INTO tblEmp (ID, firstname, lastname, email, position) VALUES ('"+textBox1.Text+"','"+textBox2.Text+"', '"+textBox3.Text+"', '"+textBox4.Text+"', '"+comboBox1.Text+"')", con);
       cmd.ExecuteNonQuery();
       con.Close();
       MessageBox.Show("Data Added!");
  }
  </code></pre>
  
  <p>When executing this, the <code>MessageBox</code> showed up which means the execution was successful. But, when I checked on the table , the data that I am trying to insert before isn't appear at all.</p>
  
  <p>I have one database (<code>loginDB.mdf</code>) with 2 tables inside :
  - <code>TblLogin</code> - contains <code>username</code> and <code>password</code> for login purpose which executed successfully.
  - <code>tblEmp</code> - contains employee data, this is the one that I tried to insert data to.</p>
  
  <p>What I don't understand is why the <code>MessageBox</code> appear when in fact none inserted into my <code>tblEmp</code>.</p>
  
  <p><strong>EDIT</strong> : <code>ConnectionString</code> to <code>loginDB.mdf</code> : </p>
  
  <pre><code>Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Users\Andreas\documents\visual studio 2010\Projects\LoginApplication\LoginApplication\loginDB.mdf";Integrated Security=True;User Instance=True
  </code></pre>
  
  <p>The database name is <code>loginDB.mdf</code> instead of <code>logindatabase.mdf</code> as previously written. I changed it to <code>loginDB.mdf</code> just to test it, but still no changes appear.</p>