M
marty.overdear
I have a dataset that I want to update. I pull the row out that I want
to update. There is a value in one of the columns that must be
analized to determine if other values need to change. This works great
as long as there is something in that column. If that DB column is
empty, I get this error...
"System.Data.StrongTypingException: Cannot get value because it is
DBNull. ---> System.InvalidCastException: Cast from type 'DBNull' to
type 'Decimal' is not valid.
I have tried all sorts of things.
I am wanting to get like, row.CCNum
THis is great unless CCNumis empty. I've tried the method
isDBNull(row.CCNum), but I still get the same error. How do I return a
value from a DB and not error out if its empty? I have multiple
columns to update, so I don't want to use an execute reader. I would
like to use the 'row' type methods to get this done.
to update. There is a value in one of the columns that must be
analized to determine if other values need to change. This works great
as long as there is something in that column. If that DB column is
empty, I get this error...
"System.Data.StrongTypingException: Cannot get value because it is
DBNull. ---> System.InvalidCastException: Cast from type 'DBNull' to
type 'Decimal' is not valid.
I have tried all sorts of things.
I am wanting to get like, row.CCNum
THis is great unless CCNumis empty. I've tried the method
isDBNull(row.CCNum), but I still get the same error. How do I return a
value from a DB and not error out if its empty? I have multiple
columns to update, so I don't want to use an execute reader. I would
like to use the 'row' type methods to get this done.