Question: ```
String ConString =  @"DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\BizContact.mdf;Integrated Security=True;User Instance=True";

SqlConnection cn = new SqlConnection(ConString);
try
{
   cn.Open();
   MessageBox.Show("connect");
}
catch (Exception)
{
   MessageBox.Show("Did not connect");
}       

SqlCommand cmd = new SqlCommand("insert tableNote values (@UserName,@Note)",cn);
cmd.Parameters.AddWithValue("@UserName", textBox1.Text);
cmd.Parameters.AddWithValue("@Note", textBox2.Text);

try
{
   int res = cmd.ExecuteNonQuery();

   if (res > 0)
   {
      MessageBox.Show("insert");
   }
}
catch (Exception ex)
{
   MessageBox.Show(ex.Message);
}
finally
{
   cn.Close();
}

```

I am trying to add new row to the database. The above code is correct with no error and it display the try statement but does not insert row into the database. Any idea to solve it.

Answer: 
Your insert statement is wrong (missing `into`). Do either:

```
insert into tableNote select @UserName,@Note

```

or

```
insert into tableNote (column_name1, column_name2) values (@UserName,@Note)

```
Open up Sql Profiler and watch it execute the command, then try replaying that command into Sql Management Studio. More than likely, it'll show you that the query is ever so slightly malformed such that it happily does nothing successfully.