title: Invalid column name error when Saving Selected Text From Drop Down Box into Database
body: <p>Platform used : Microsoft Visual Studio 2010 (C#)<br>
  Database : SQL Server 2008 R2 Express </p>
  
  <p>I want to get the text from the drop down and put it into database table. I am getting error saying </p>
  
  <blockquote>
    <p>Invalid column name 'Type'. </p>
  </blockquote>
  
  <p>though column is present in database table.</p>
  
  <pre><code>da.InsertCommand = new SqlCommand("insert into tblProductMaster ([Name],[Type],[Height],[Width],[Length],[Price]) values( @Name , @Type , @Height , @Width , @Length , @Price )", con);
  
  da.InsertCommand.Parameters.Add("@Name", SqlDbType.VarChar).Value = txtName.Text;
  da.InsertCommand.Parameters.Add("@Type", SqlDbType.VarChar, 10).Value = ddlType.SelectedItem.ToString();
  da.InsertCommand.Parameters.Add("@Height", SqlDbType.Float).Value = float.Parse(txtHeight.Text);
  da.InsertCommand.Parameters.Add("@Width", SqlDbType.Float).Value = float.Parse(txtWidth.Text);
  da.InsertCommand.Parameters.Add("@Length", SqlDbType.Float).Value = float.Parse(txtLength.Text);
  da.InsertCommand.Parameters.Add("@Price", SqlDbType.SmallMoney).Value = int.Parse(txtPrice.Text);
  
  da.InsertCommand.ExecuteNonQuery();
  </code></pre>