I have field in sql tbl as numeric data type (numeric(18,0) but in c# code when i save data
display this message "
Arithmetic overflow error converting numeric to data type varchar.The statement has been terminated."
As follow code c#
SqlCommand cmd = new SqlCommand("CashPlan_Insert", Conn);
cmd.Parameters.Add("@CarNo", SqlDbType.VarChar).Value = (DropDownList1.SelectedValue);
cmd.CommandType = CommandType.StoredProcedure;
Conn.Open();
cmd.ExecuteNonQuery();
Conn.Close();

Abdalla ElawadRank #1,443 · 1.1K reputationPosted Aug 17, 2016, 4:58 AM EDT
Vinay SinghRank #604 · 4K reputationPosted Aug 17, 2016, 2:39 AM EDT
Midhun TpRank #388 · 6.5K reputationPosted Aug 17, 2016, 2:45 AM EDT
Abdalla ElawadRank #1,443 · 1.1K reputationPosted Aug 17, 2016, 2:53 AM EDT
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Aug 17, 2016, 4:46 AM EDT
Abdalla ElawadRank #1,443 · 1.1K reputationPosted Aug 17, 2016, 5:15 AM EDT
Midhun TpRank #388 · 6.5K reputationPosted Aug 17, 2016, 6:12 AM EDT
Tapan PatelRank #614 · 3.9K reputationPosted Aug 17, 2016, 6:20 AM EDT
Abdalla ElawadRank #1,443 · 1.1K reputationPosted Aug 17, 2016, 3:03 AM EDT
Midhun TpRank #388 · 6.5K reputationPosted Aug 17, 2016, 3:25 AM EDT
Abdalla ElawadRank #1,443 · 1.1K reputationPosted Aug 17, 2016, 3:44 AM EDT
Abdalla ElawadRank #1,443 · 1.1K reputationPosted Aug 17, 2016, 3:59 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts