The connection was not closed. The connection's current state is open.
Object cannot be cast from DBNull to other types.
Error on save
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
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
Hemant KumarRank #1,202 · 1.5K reputationPosted Nov 10, 2013, 7:51 AM EST
You many be converting the row value which is null or DBNull.You can check if the row is null or not like this
If(Convert.IsDBNull(row("name"))
{
string _name=row("name").ToString();
}
Please debug the code.