title: insert query is giving no error but is not inserting in the database
body: <p>I have a  insert query which i m using to insert data into SQL Server DB 2008 using c#.net code. the query does not give any error but also does not insert data into DB
  Following is the code :-</p>
  
  <pre><code>string strcon = connection();
  
  if (con.State == ConnectionState.Closed)
  {
      con.ConnectionString = strcon;
      con.Open();
      strquery = query + " values( '"+ cheqval +"' , '" +
          dtval.ToShortDateString() +"' , '"+ amtval +"','"+ conameval + "')";
      SqlCommand cmd =  new SqlCommand(strquery, con);
      i = cmd.ExecuteNonQuery();
      con.Close();
  }
  </code></pre>
  
  <p>my insert query is forming correctly but is not inserting data into the DB.
  What shud i do .... please help .... i also tried the parameterised query but even that does not work :((</p>