Through the front end I want to insert NULL value to the Column whose DataType is Int.
I used like this:
POP.JobOrderID = Convert.ToInt32(DBNull.Value);
But I cannot Insert Null value, it throws error such as "Object cannot be cast from DBNull to other types":
How to insert NULL values?
if you wish to do it POP.JobOrderID
should be type int?
(nullable int) not int
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With