Hi
In below code i am getting error . Value in txtVolPf = ""
C#
cmd.Parameters.AddWithValue("@Volpf", SqlDbType.Decimal).Value = Convert.ToDecimal(txtVolPf.Text);Thanks
Hi
In below code i am getting error . Value in txtVolPf = ""
cmd.Parameters.AddWithValue("@Volpf", SqlDbType.Decimal).Value = Convert.ToDecimal(txtVolPf.Text);Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tahir AnsariRank #366 · 6.8K reputationPosted Sep 8, 2024, 9:43 AM EDT
Hi Ramco,
cmd.Parameters.AddWithValue("@Volpf", string.IsNullOrWhiteSpace(txtVolPf.Text) ? (object)DBNull.Value : (object)Convert.ToDecimal(txtVolPf.Text));