title: When I use this code in ASP.NET MVC, it inserts 2 rows into the database.. 1 is empty and the other is with data i input
body: <pre><code>com.CommandText = "insert into Merit (p_id, p_type_id, Prog_id, T_id, q_id, status_id) values((select p_id from personal_info where cnic='" + In.CNIC+"'), (select p_type_id from Prog_type where p_type_name='"+In.Program_Type+"'), (select Prog_id from Programme where prog_name='"+In.Program+ "'), (select T_id from Timing where Timing='" +In.Timing+ "'), (select q_id from Quota where q_name='" +In.Quota+ "'), 1)";
  com.Connection = con;
  com.ExecuteNonQuery();
  </code></pre>