i am getting below error
Error converting data type nvarchar to date in
cmd.Parameters.AddWithValue("@Inv_Date", inv_Date);
private void InsertRows(string barcode, string qty, string weight,
string cat_id, string contno, string c_agent_id, string loc_id,
string sup_id, decimal rate, decimal freight, string forwarder,
decimal trucking_rate, decimal clearing_rate, decimal Weight_Zone,
string inv_no, string inv_date)
{
//con.Open();
SqlCommand cmd = new SqlCommand("Sp_Insert_ContnoM", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Action", "Insert");
cmd.Parameters.AddWithValue("@ContNo", barcode);
cmd.Parameters.AddWithValue("@ConWeight", weight);
cmd.Parameters.AddWithValue("@No_Of_Bales", qty);
cmd.Parameters.AddWithValue("@Contrackno", contno);
cmd.Parameters.AddWithValue("@Cat_Id", cat_id);
cmd.Parameters.AddWithValue("@Clearning_agent_ID", c_agent_id);
cmd.Parameters.AddWithValue("@Loc_ID", loc_id);
cmd.Parameters.AddWithValue("@Supplier_ID", sup_id);
cmd.Parameters.AddWithValue("@Container_Rate", rate);
cmd.Parameters.AddWithValue("@Freight_Charges", freight);
cmd.Parameters.AddWithValue("@Forwarder_ID", forwarder);
cmd.Parameters.AddWithValue("@Trucking_Charges", trucking_rate);
cmd.Parameters.AddWithValue("@Clearning_Agent_Charges", clearing_rate);
cmd.Parameters.AddWithValue("@Weight_Zone", Weight_Zone);
cmd.Parameters.AddWithValue("@Inv_No", inv_no);
cmd.Parameters.AddWithValue("@Inv_Date", inv_Date);
cmd.Parameters.AddWithValue("@entrydate", DateTime.Now);
con.Open();
cmd.ExecuteNonQuery();
int i = cmd.ExecuteNonQuery();
if (i > 0)
{
Response.Write("<script>alert('Record save successuly')</script>");
}
else
{
Response.Write("<script>alert('Record Not save')</script>");
}
con.Close();
}